Skip to content

Commit

Permalink
fix: should apply cloned rules to custom blocks too
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Nov 5, 2020
1 parent c070aeb commit b2d7ffb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pluginWebpack5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 = (
Expand Down

0 comments on commit b2d7ffb

Please # to comment.