File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -892,7 +892,7 @@ async function compileStyles( packageName ) {
892892 const srcDir = path . join ( packageDir , 'src' ) ;
893893
894894 // Process .module.css files and generate JS modules
895- await Promise . all (
895+ const cssResults = await Promise . all (
896896 cssModuleEntries . map ( async ( styleEntryPath ) => {
897897 const buildDir = path . join ( packageDir , 'build' ) ;
898898 const buildModuleDir = path . join ( packageDir , 'build-module' ) ;
@@ -936,9 +936,19 @@ async function compileStyles( packageName ) {
936936 `export default ${ jsExport } ;\n`
937937 ) ,
938938 ] ) ;
939+
940+ // Return the processed CSS for combining
941+ return result . css ;
939942 } )
940943 ) ;
941944
945+ // Generate combined stylesheet from all CSS modules
946+ if ( cssResults . length > 0 ) {
947+ const combinedCss = cssResults . join ( '\n' ) ;
948+ await mkdir ( buildStyleDir , { recursive : true } ) ;
949+ await writeFile ( path . join ( buildStyleDir , 'style.css' ) , combinedCss ) ;
950+ }
951+
942952 // Process SCSS files
943953 await Promise . all (
944954 scssEntries . map ( async ( styleEntryPath ) => {
You can’t perform that action at this time.
0 commit comments