- Issue created by @Anybody
- Assigned to lrwebks
- Status changed to Needs work
3 months ago 8:14am 4 November 2024 - 🇩🇪Germany Anybody Porta Westfalica
Yeah the settings page still isn't very good and clear. And each installation method (cdn / local / npm-asset / bower-asset) uses different file paths. We should make the path configurable for special cases and provide one suggested way to install locally.
In my opinion it should not be npm-asset, because it downloads many many dev assets.
I think best would be ✨ Provide drush vuejs:download vue & petitevue command like in 2.x Active or if that doesn't work well: bower-asssetAssigning this to @grevil for a quick and focused implementation, you may delegate this to @lrwebks once the plan is clear.
- 🇩🇪Germany Anybody Porta Westfalica
It's even worse: There's no bower-asset for vuejs 3!
See
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
- 🇩🇪Germany Grevil
It's even worse: There's no bower-asset for vuejs 3
Ok, I'd say in this case we should provide a composer.libraries.json and install the required library using the "composer-merge-plugin".
Similar to how webform does this: https://www.drupal.org/node/3003140 →Here is another fairly recent merge request for "js_cookie", where the exact same installation flow was suggested: https://git.drupalcode.org/project/js_cookie/-/merge_requests/2/diffs.
This way we can use the original npm package (https://www.npmjs.com/package/vue) and still use composer to manage / update the library. The only downside would be, that we would need to require the "composer-merge-plugin" but IMHO this isn't worse than setting up composer to use third party libraries through npm-asset / bower-asset.
What do you think @anybody?
- 🇩🇪Germany Anybody Porta Westfalica
@grevil I agree. And both should work, once THIS issue (here, this one) is solved. And I think we should start with THIS one, because it fixes a lot of flaws by making the path configurable.
The drush / composer.libraries.json solution should be implemented here: ✨ Provide drush vuejs:download vue & petitevue command like in 2.x Active
- 🇩🇪Germany Grevil
I'd suggest we use the composer.libraries.json as the main approach here, but also implement the manual download one. IMO the manual download is far worse, then the merge plugin approach.
- 🇩🇪Germany Grevil
Ok actually I think we have the same problem with the vuejs npm package as with npm-asset. I guess the vue js npm package ships with the same dev assets as the npm-asset package...
Are we sure, there are no dev assets in the manual download? I'd say we should use this issue to define the path for manual downloads AND enable npm-asset / merge-plugin.
Automatically closed - issue fixed for 2 weeks with no activity.