Commit 14bfc018 authored by Evan You's avatar Evan You

fix: avoid mutating original rules array

close #1286
parent 0039fb98
...@@ -26,7 +26,7 @@ class VueLoaderPlugin { ...@@ -26,7 +26,7 @@ class VueLoaderPlugin {
} }
// get a hold of the raw rules // 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 // use webpack's RuleSet utility to normalize user rules
const rawNormalizedRules = new RuleSet(rawRules).rules const rawNormalizedRules = new RuleSet(rawRules).rules
...@@ -127,6 +127,9 @@ class VueLoaderPlugin { ...@@ -127,6 +127,9 @@ class VueLoaderPlugin {
return parsed.vue != null return parsed.vue != null
} }
}) })
// replace original rules
compiler.options.module.rules = rawRules
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment