You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)