Skip to content

Commit 477912c

Browse files
nolimitdevfreddy38510
authored andcommitted
fix: do not throw when Rule.layer (vuejs#2000)
Related to vuejs#1849 but this PR doesn't fix the problem that `component.vue?type=style` doesn't inherit the layer. It only ensures that webpack does not throw, and all existing usages aren't broken by `vue-loader`.
1 parent 2bfe1aa commit 477912c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/pluginWebpack5.ts

+2
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@ const ruleSetCompiler = new RuleSetCompiler([
9090
new BasicMatcherRulePlugin('realResource'),
9191
new BasicMatcherRulePlugin('issuer'),
9292
new BasicMatcherRulePlugin('compiler'),
93+
new BasicMatcherRulePlugin('issuerLayer'),
9394
...objectMatcherRulePlugins,
9495
new BasicEffectRulePlugin('type'),
9596
new BasicEffectRulePlugin('sideEffects'),
9697
new BasicEffectRulePlugin('parser'),
9798
new BasicEffectRulePlugin('resolve'),
9899
new BasicEffectRulePlugin('generator'),
100+
new BasicEffectRulePlugin('layer'),
99101
new UseEffectRulePlugin(),
100102
])
101103

0 commit comments

Comments
 (0)