Commit 7ca8e2c5 authored by Haoqun Jiang's avatar Haoqun Jiang

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
parent f79bb087
...@@ -3,19 +3,24 @@ const id = 'vue-loader-plugin' ...@@ -3,19 +3,24 @@ const id = 'vue-loader-plugin'
const NS = 'vue-loader' const NS = 'vue-loader'
const BasicEffectRulePlugin = require('webpack/lib/rules/BasicEffectRulePlugin') const BasicEffectRulePlugin = require('webpack/lib/rules/BasicEffectRulePlugin')
const BasicMatcherRulePlugin = require('webpack/lib/rules/BasicMatcherRulePlugin') const BasicMatcherRulePlugin = require('webpack/lib/rules/BasicMatcherRulePlugin')
const DescriptionDataMatcherRulePlugin = require('webpack/lib/rules/DescriptionDataMatcherRulePlugin')
const RuleSetCompiler = require('webpack/lib/rules/RuleSetCompiler') const RuleSetCompiler = require('webpack/lib/rules/RuleSetCompiler')
const UseEffectRulePlugin = require('webpack/lib/rules/UseEffectRulePlugin') const UseEffectRulePlugin = require('webpack/lib/rules/UseEffectRulePlugin')
const ruleSetCompiler = new RuleSetCompiler([ const ruleSetCompiler = new RuleSetCompiler([
new BasicMatcherRulePlugin('test', 'resource'), new BasicMatcherRulePlugin('test', 'resource'),
new BasicMatcherRulePlugin('mimetype'),
new BasicMatcherRulePlugin('dependency'),
new BasicMatcherRulePlugin('include', 'resource'), new BasicMatcherRulePlugin('include', 'resource'),
new BasicMatcherRulePlugin('exclude', 'resource', true), new BasicMatcherRulePlugin('exclude', 'resource', true),
new BasicMatcherRulePlugin('resource'),
new BasicMatcherRulePlugin('conditions'), new BasicMatcherRulePlugin('conditions'),
new BasicMatcherRulePlugin('resource'),
new BasicMatcherRulePlugin('resourceQuery'), new BasicMatcherRulePlugin('resourceQuery'),
new BasicMatcherRulePlugin('resourceFragment'),
new BasicMatcherRulePlugin('realResource'), new BasicMatcherRulePlugin('realResource'),
new BasicMatcherRulePlugin('issuer'), new BasicMatcherRulePlugin('issuer'),
new BasicMatcherRulePlugin('compiler'), new BasicMatcherRulePlugin('compiler'),
new DescriptionDataMatcherRulePlugin(),
new BasicEffectRulePlugin('type'), new BasicEffectRulePlugin('type'),
new BasicEffectRulePlugin('sideEffects'), new BasicEffectRulePlugin('sideEffects'),
new BasicEffectRulePlugin('parser'), new BasicEffectRulePlugin('parser'),
......
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