Skip to content

fix: remove implicit requirement of vue-loader #463

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haoqunjiang
Copy link
Contributor

.loader is a setter rather than a selector.
.use alone is sufficient for selecting the loader rule
https://github.com/neutrinojs/webpack-chain#config-module-rules-uses-loaders-modifying-options

So this expression implicitly introduced a dependency on the
vue-loader name, and expected it to be vue-loader v15, which, isn't
guranteed to be exact the case.

Because Vue CLI supports both Vue 2 and Vue 3 in the core service,
the vue-loader dependency used to be v15 and v16 is aliases as
vue-loader-v16.

But when I tried to upgrade to webpack 5 and make v16 the default
vue-loader dependency, it breaks this plugin and I had to
workaround it.

See <7c672bd (#6060)>

`.loader` is a setter rather than a selector.
`.use` alone is sufficient for selecting the loader rule
<https://github.com/neutrinojs/webpack-chain#config-module-rules-uses-loaders-modifying-options>

So this expression implicitly introduced a dependency on the
`vue-loader` name, and expected it to be vue-loader v15, which, isn't
guranteed to be exact the case.

Because Vue CLI supports both Vue 2 and Vue 3 in the core service,
the `vue-loader` dependency used to be v15 and v16 is aliases as
`vue-loader-v16`.

But when I tried to upgrade to webpack 5 and make v16 the default
`vue-loader` dependency, it breaks this plugin and had to workaround it.

See vuejs/vue-cli@7c672bd#diff-e201f09cd938f870f5a24c75f97cf10a2a16819caf5f5b154bcc23c4ff915239R99-R106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant