{"record":{"id":"08850e068eb45660","repo":"vercel/next.js","slug":"experimental-csschunking-strict-is-only-suppo","errorCode":null,"errorMessage":"`experimental.cssChunking: \"strict\"` is only supported with webpack. Please remove the option or run Next.js with webpack in ${configFileName}.","messagePattern":"`experimental\\.cssChunking: \"strict\"` is only supported with webpack\\. Please remove the option or run Next\\.js with webpack in (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/config.ts","lineNumber":527,"sourceCode":"        `Please remove the \"functions\" property from your sassOptions in ${configFileName}.`\n    )\n  }\n\n  // Validate experimental.cssChunking compatibility with the active bundler. Graph mode is\n  // Turbopack-only; strict mode and `false` (single-chunk-per-module) are webpack-only.\n  // Only validate during build/dev — `next start` doesn't pick a bundler and would otherwise\n  // see `process.env.TURBOPACK` unset and reject a valid `cssChunking: \"graph\"` config.\n  if (phase !== PHASE_PRODUCTION_SERVER && phase !== PHASE_INFO) {\n    const cssChunkingValue = result.experimental.cssChunking\n    const cssChunkingMode = resolveCssChunkingMode(cssChunkingValue)\n    if (cssChunkingMode === 'graph' && !process.env.TURBOPACK) {\n      throw new Error(\n        `\\`experimental.cssChunking: \"graph\"\\` is only supported with Turbopack. ` +\n          `Please remove the option or run Next.js with Turbopack in ${configFileName}.`\n      )\n    }\n    if (cssChunkingMode === 'strict' && process.env.TURBOPACK) {\n      throw new Error(\n        `\\`experimental.cssChunking: \"strict\"\\` is only supported with webpack. ` +\n          `Please remove the option or run Next.js with webpack in ${configFileName}.`\n      )\n    }\n    // Only error when `false` was set explicitly. `undefined` (the default) also resolves to\n    // `'off'` but that's the implicit default and must not error on Turbopack.\n    if (cssChunkingValue === false && process.env.TURBOPACK) {\n      throw new Error(\n        `\\`experimental.cssChunking: false\\` is only supported with webpack. ` +\n          `Please remove the option or run Next.js with webpack in ${configFileName}.`\n      )\n    }\n\n    if (\n      result.experimental.turbopackRustReactCompiler &&\n      !process.env.TURBOPACK\n    ) {\n      throw new Error(","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/packages/next/src/server/config.ts#L509-L545","documentation":"`experimental.cssChunking: \"strict\"` is a webpack-only strategy. If the resolved mode is 'strict' and Turbopack is active, normalization throws. Skipped during `next start` and PHASE_INFO. This is the mirror of the graph-mode Turbopack-only constraint.","triggerScenarios":"Setting `experimental: { cssChunking: 'strict' }` and running `next dev`/`next build` with Turbopack (the default bundler).","commonSituations":"Copying a webpack-era cssChunking config into a project now on Turbopack. Sharing a config file between webpack and Turbopack branches.","solutions":["Run with webpack: `next build --webpack`","Remove the cssChunking option (let it default) or set it to a Turbopack-supported value like 'graph'"],"exampleFix":"// before\n// next build  (Turbopack)\nmodule.exports = { experimental: { cssChunking: 'strict' } }\n// after (option A)\nmodule.exports = { experimental: { cssChunking: 'graph' } }\n// after (option B)\nmodule.exports = {}\n// run: next build --webpack","handlingStrategy":"validation","validationCode":"const isTurbopack = Boolean(process.env.TURBOPACK)\nif (cssChunking === 'strict' && isTurbopack) {\n  cssChunking = undefined // or switch to webpack\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Conditionally set cssChunking based on the bundler","Avoid sharing one cssChunking value across webpack and Turbopack projects"],"tags":["config","css","webpack","bundlers","experimental"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}