Closed
Description
Version
15.0.0
Reproduction link
https://jsbin.com/kexokimalo/edit?js
Steps to reproduce
- Have a webpack configuration with multiple entry points
- Share the rule array between multiple entry points, each using the VueLoaderPlugin()
What is expected?
Webpack compiles things
What is actually happening?
An error message
Error: [VueLoaderPlugin Error] No matching use for vue-loader is found.
Make sure the rule matching .vue files include vue-loader in its use.
The problem is that the plugin VueLoaderPlugin works off the already processed rules array which has pitcher injected into it. Now something other than the vue-loader rule will match and cause the error.
I guess one fix could involve checking whether the rules array has already been modified and bailing early if it has.
Workaround: shallow clone your rules using rules.slice(0)
Metadata
Metadata
Assignees
Labels
No labels