-
Notifications
You must be signed in to change notification settings - Fork 2
feat!: require explicit vue-loader@legacy for Vue 2, remove hidden install
#688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
07cbad2 to
c2d1a2b
Compare
|
Changes in the force-push:
The last one change is important. The purpose of the script is to warn in a simple way about an incompatible vue-loader version. |
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
c2d1a2b to
d760682
Compare
|
|
@DorraJaouad Also adding you as it is kind of a security issue. Currently
|
Current approach
Currently
webpack-vue-configsupports both Vue 2 (withvue-loader@15) and Vue 3 (withvue-loader@17) via a postinstall script.In Vue 2 projects it replaces
vue-loader@17with requiredvue-loader@15by installing it with--no-save.In other words, there might be no
vue-loaderspecified inpackage.jsonand an incorrect version specified inpackage-lock.jsonwhile everything magically works.New approach (breaking change)
No more hidden install. In Vue 2 apps a developer MUST install the required
vue-loadermanually.Motivation
This postinstall is a bit hacky. It is intended since there is no other way to have conditional dependencies. For example, popular
vue-demipackage does something similar.However, it doesn't work in environments where only explicitly specified in the
package-lock.jsondependencies are installed. For example,nixpkgs.cc @provokateurin
Making migration simpler
postinstall script is kept only for the version checking and showing a warning.
Otherwise there is no
npm cierror, and the build error might be less obvious.