diff --git a/lib/plugin.js b/lib/plugin.js index c03119677..90fdb8045 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -26,7 +26,7 @@ class VueLoaderPlugin { } // get a hold of the raw rules - const rawRules = compiler.options.module.rules + const rawRules = compiler.options.module.rules.slice() // use webpack's RuleSet utility to normalize user rules const rawNormalizedRules = new RuleSet(rawRules).rules @@ -127,6 +127,9 @@ class VueLoaderPlugin { return parsed.vue != null } }) + + // replace original rules + compiler.options.module.rules = rawRules } }