File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1897,7 +1897,10 @@ export default async function getBaseWebpackConfig(
1897
1897
new NextFontManifestPlugin ( {
1898
1898
appDir,
1899
1899
} ) ,
1900
- ! dev && isClient && new MergeCssChunksPlugin ( ) ,
1900
+ ! dev &&
1901
+ isClient &&
1902
+ config . experimental . mergeCssChunks &&
1903
+ new MergeCssChunksPlugin ( ) ,
1901
1904
! dev &&
1902
1905
isClient &&
1903
1906
new ( require ( './webpack/plugins/telemetry-plugin' ) . TelemetryPlugin ) (
Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ export const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>
276
276
linkNoTouchStart : z . boolean ( ) . optional ( ) ,
277
277
manualClientBasePath : z . boolean ( ) . optional ( ) ,
278
278
middlewarePrefetch : z . enum ( [ 'strict' , 'flexible' ] ) . optional ( ) ,
279
+ mergeCssChunks : z . boolean ( ) . optional ( ) ,
279
280
navigationRAF : z . boolean ( ) . optional ( ) ,
280
281
nextScriptWorkers : z . boolean ( ) . optional ( ) ,
281
282
// The critter option is unknown, use z.any() here
Original file line number Diff line number Diff line change @@ -193,6 +193,11 @@ export interface ExperimentalConfig {
193
193
swrDelta ?: SwrDelta
194
194
middlewarePrefetch ?: 'strict' | 'flexible'
195
195
manualClientBasePath ?: boolean
196
+ /**
197
+ * This will enable a plugin that attempts to keep CSS entries below a certain amount
198
+ * by merging smaller chunks into larger ones
199
+ */
200
+ mergeCssChunks ?: boolean
196
201
/**
197
202
* @deprecated use config.cacheHandler instead
198
203
*/
@@ -904,6 +909,7 @@ export const defaultConfig: NextConfig = {
904
909
missingSuspenseWithCSRBailout : true ,
905
910
optimizeServerReact : false ,
906
911
useEarlyImport : false ,
912
+ mergeCssChunks : true ,
907
913
} ,
908
914
}
909
915
You can’t perform that action at this time.
0 commit comments