File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments