Skip to content

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