Skip to content

Commit ef589df

Browse files
authored
fix: do not throw when Rule.layer (#2000)
Related to #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 44141f8 commit ef589df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pluginWebpack5.ts

+2
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ const ruleSetCompiler = new RuleSetCompiler([
8989
new BasicMatcherRulePlugin('realResource'),
9090
new BasicMatcherRulePlugin('issuer'),
9191
new BasicMatcherRulePlugin('compiler'),
92+
new BasicMatcherRulePlugin('issuerLayer'),
9293
...objectMatcherRulePlugins,
9394
new BasicEffectRulePlugin('type'),
9495
new BasicEffectRulePlugin('sideEffects'),
9596
new BasicEffectRulePlugin('parser'),
9697
new BasicEffectRulePlugin('resolve'),
9798
new BasicEffectRulePlugin('generator'),
99+
new BasicEffectRulePlugin('layer'),
98100
new UseEffectRulePlugin(),
99101
])
100102

0 commit comments

Comments
 (0)