File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 22" webpack " : patch
33---
44
5- Avoid generating JavaScript modules for CSS exports that are not used, reducing unnecessary output and bundle size.
5+ Avoid generating JavaScript modules for CSS exports that are not used, reducing unnecessary output and bundle size.
Original file line number Diff line number Diff line change @@ -363,6 +363,7 @@ class CssGenerator extends Generator {
363363
364364 if ( generateContext . concatenationScope ) {
365365 const source = new ConcatSource ( ) ;
366+ /** @type {Set<string> } */
366367 const usedIdentifiers = new Set ( ) ;
367368 const { RESERVED_IDENTIFIER } = getPropertyName ( ) ;
368369
@@ -414,6 +415,7 @@ class CssGenerator extends Generator {
414415 ) ;
415416 }
416417
418+ /** @type {string[] } */
417419 const exports = [ ] ;
418420
419421 for ( const [ name , v ] of cssData . exports ) {
@@ -500,7 +502,7 @@ class CssGenerator extends Generator {
500502 }
501503 }
502504 }
503- if ( this . _exportsOnly ) {
505+ if ( this . _generatesJsOnly ( module ) ) {
504506 if ( sourceTypes . has ( JAVASCRIPT_TYPE ) || isEntryModule ) {
505507 return JAVASCRIPT_TYPES ;
506508 }
You can’t perform that action at this time.
0 commit comments