Skip to content

Commit 10bf4d5

Browse files
authored
fix(css): prevent adding empty css rule (#1182)
1 parent 0300dad commit 10bf4d5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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;

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)