Skip to content

Commit 9d26f47

Browse files
committed
chore: update
1 parent 1bfdaae commit 9d26f47

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

packages/core/src/css/cssConfig.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,16 @@ const pluginLibCss = (
141141
setup(api) {
142142
// 1. mark and remove the "normal css asset" (contain RSLIB_CSS_ENTRY_FLAG)
143143
// 2. preserve CSS Modules asset
144-
api.processAssets({ stage: 'additional' }, ({ assets, compilation }) => {
145-
for (const key of Object.keys(assets)) {
146-
if (key.match(RSLIB_CSS_ENTRY_FLAG)) {
147-
compilation.deleteAsset(key);
144+
api.processAssets(
145+
{ stage: 'optimize-count' },
146+
({ assets, compilation }) => {
147+
for (const key of Object.keys(assets)) {
148+
if (key.match(RSLIB_CSS_ENTRY_FLAG)) {
149+
compilation.deleteAsset(key);
150+
}
148151
}
149-
}
150-
});
152+
},
153+
);
151154

152155
api.modifyBundlerChain((config, { CHAIN_ID }) => {
153156
let isUsingCssExtract = false;

0 commit comments

Comments
 (0)