Skip to content

Commit d480a86

Browse files
committed
flag turbopackInferModuleSideEffects so it is only enabled in canary builds
1 parent 99a947c commit d480a86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/next/src/server/config-shared.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export interface ExperimentalConfig {
469469
* analyze module code to determine if it has side effects. This can improve tree shaking
470470
* and bundle size at the cost of some additional analysis.
471471
*
472-
* Defaults to `true`.
472+
* Defaults to `true` in canary builds only
473473
*/
474474
turbopackInferModuleSideEffects?: boolean
475475

@@ -1576,6 +1576,7 @@ export const defaultConfig = Object.freeze({
15761576
mcpServer: true,
15771577
turbopackFileSystemCacheForDev: true,
15781578
turbopackFileSystemCacheForBuild: false,
1579+
turbopackInferModuleSideEffects: !isStableBuild(),
15791580
},
15801581
htmlLimitedBots: undefined,
15811582
bundlePagesRouterDependencies: false,

0 commit comments

Comments
 (0)