From b2d7ffb06d065fb40eade9335123eab2f491a17e Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 5 Nov 2020 16:51:50 +0800 Subject: [PATCH] fix: should apply cloned rules to custom blocks too --- src/pluginWebpack5.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pluginWebpack5.ts b/src/pluginWebpack5.ts index eaf62ae2c..70bebea5c 100644 --- a/src/pluginWebpack5.ts +++ b/src/pluginWebpack5.ts @@ -79,7 +79,7 @@ const ruleSetCompiler = new RuleSetCompiler([ new BasicEffectRulePlugin('sideEffects'), new BasicEffectRulePlugin('parser'), new BasicEffectRulePlugin('resolve'), - new UseEffectRulePlugin() + new UseEffectRulePlugin(), ]) class VueLoaderPlugin implements Plugin { @@ -225,7 +225,9 @@ const langBlockRuleCheck = ( query: qs.ParsedUrlQuery, rule: CompiledRule ): boolean => { - return !rule.conditions.length || query.lang != null + return ( + query.type === 'custom' || !rule.conditions.length || query.lang != null + ) } const langBlockRuleResource = (