Skip to content

Commit

Permalink
fix: add rule plugins to keep up with webpack 5 new features
Browse files Browse the repository at this point in the history
  • Loading branch information
sodatea committed Oct 29, 2020
1 parent e88dbe9 commit be9077c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pluginWebpack5.ts
Expand Up @@ -8,6 +8,7 @@ const NS = 'vue-loader'
const NormalModule = require('webpack/lib/NormalModule')
const BasicEffectRulePlugin = require('webpack/lib/rules/BasicEffectRulePlugin')
const BasicMatcherRulePlugin = require('webpack/lib/rules/BasicMatcherRulePlugin')
const DescriptionDataMatcherRulePlugin = require('webpack/lib/rules/DescriptionDataMatcherRulePlugin')
const UseEffectRulePlugin = require('webpack/lib/rules/UseEffectRulePlugin')
const RuleSetCompiler = require('webpack/lib/rules/RuleSetCompiler') as RuleSetCompiler

Expand Down Expand Up @@ -62,20 +63,23 @@ type Effect = BasicEffect | UseEffect

const ruleSetCompiler = new RuleSetCompiler([
new BasicMatcherRulePlugin('test', 'resource'),
new BasicMatcherRulePlugin('mimetype'),
new BasicMatcherRulePlugin('dependency'),
new BasicMatcherRulePlugin('include', 'resource'),
new BasicMatcherRulePlugin('exclude', 'resource', true),
new BasicMatcherRulePlugin('resource'),
new BasicMatcherRulePlugin('conditions'),
new BasicMatcherRulePlugin('resource'),
new BasicMatcherRulePlugin('resourceQuery'),
new BasicMatcherRulePlugin('resourceFragment'),
new BasicMatcherRulePlugin('realResource'),
new BasicMatcherRulePlugin('issuer'),
new BasicMatcherRulePlugin('compiler'),
new DescriptionDataMatcherRulePlugin(),
new BasicEffectRulePlugin('type'),
new BasicEffectRulePlugin('sideEffects'),
new BasicEffectRulePlugin('parser'),
new BasicEffectRulePlugin('resolve'),
new BasicEffectRulePlugin('generator'),

This comment has been minimized.

Copy link
@LinusBorg

LinusBorg Nov 7, 2020

Member

This should not have been removed @sodatea, we just added it in #1754

new UseEffectRulePlugin(),
new UseEffectRulePlugin()
])

class VueLoaderPlugin implements Plugin {
Expand Down

0 comments on commit be9077c

Please sign in to comment.