Skip to content

Commit b4ee7d9

Browse files
committed
fix(css): prevent adding empty css rule
1 parent 0300dad commit b4ee7d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/css/cssConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ const pluginLibCss = (
9696
CHAIN_ID.RULE.LESS,
9797
CHAIN_ID.RULE.STYLUS,
9898
]) {
99+
if (!config.module.rules.has(ruleId)) continue;
99100
const rule = config.module.rule(ruleId);
100101
if (rule.uses.has(CHAIN_ID.USE.MINI_CSS_EXTRACT)) {
101102
isUsingCssExtract = true;

0 commit comments

Comments
 (0)