Skip to content

Commit

Permalink
fix: skip matching rule with 'enforce' (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie-Yang committed Jun 23, 2020
1 parent a5be80e commit 409a0e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pluginWebpack5.ts
Expand Up @@ -96,7 +96,10 @@ class VueLoaderPlugin implements Plugin {
let vueRules: Effect[] = []

for (const rawRule of rules) {
// skip the `include` check when locating the vue rule
// skip rules with 'enforce'. eg. rule for eslint-loader
if (rawRule.enforce) {
continue
}
vueRules = match(rawRule, 'foo.vue')
if (!vueRules.length) {
vueRules = match(rawRule, 'foo.vue.html')
Expand Down

0 comments on commit 409a0e0

Please sign in to comment.