Skip to content

Commit 7ca8e2c

Browse files
committed
fix: add rule plugins to keep up with webpack 5 new features
Reference: https://github.com/webpack/webpack/blob/v5.3.1/lib/NormalModuleFactory.js#L133-L152
1 parent f79bb08 commit 7ca8e2c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/plugin-webpack5.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,24 @@ const id = 'vue-loader-plugin'
33
const NS = 'vue-loader'
44
const BasicEffectRulePlugin = require('webpack/lib/rules/BasicEffectRulePlugin')
55
const BasicMatcherRulePlugin = require('webpack/lib/rules/BasicMatcherRulePlugin')
6+
const DescriptionDataMatcherRulePlugin = require('webpack/lib/rules/DescriptionDataMatcherRulePlugin')
67
const RuleSetCompiler = require('webpack/lib/rules/RuleSetCompiler')
78
const UseEffectRulePlugin = require('webpack/lib/rules/UseEffectRulePlugin')
89

910
const ruleSetCompiler = new RuleSetCompiler([
1011
new BasicMatcherRulePlugin('test', 'resource'),
12+
new BasicMatcherRulePlugin('mimetype'),
13+
new BasicMatcherRulePlugin('dependency'),
1114
new BasicMatcherRulePlugin('include', 'resource'),
1215
new BasicMatcherRulePlugin('exclude', 'resource', true),
13-
new BasicMatcherRulePlugin('resource'),
1416
new BasicMatcherRulePlugin('conditions'),
17+
new BasicMatcherRulePlugin('resource'),
1518
new BasicMatcherRulePlugin('resourceQuery'),
19+
new BasicMatcherRulePlugin('resourceFragment'),
1620
new BasicMatcherRulePlugin('realResource'),
1721
new BasicMatcherRulePlugin('issuer'),
1822
new BasicMatcherRulePlugin('compiler'),
23+
new DescriptionDataMatcherRulePlugin(),
1924
new BasicEffectRulePlugin('type'),
2025
new BasicEffectRulePlugin('sideEffects'),
2126
new BasicEffectRulePlugin('parser'),

0 commit comments

Comments
 (0)