Unverified Commit 1ff10a03 authored by Ethan Arrowood's avatar Ethan Arrowood Committed by GitHub

enable `optimizeServerReact` by default (#62658)

Enable the `experimental#optimizeServerReact` configuration by default. 

Disable the `optimize_use_state` option for the optimization as this may
cause issues in React 19

Closes NEXT-2640
parent 6cbab35e
......@@ -408,7 +408,7 @@ export function getLoaderSWCOptions({
if (optimizeServerReact && isServer && !development) {
baseOptions.optimizeServerReact = {
optimize_use_state: true,
optimize_use_state: false,
}
}
......
......@@ -912,7 +912,7 @@ export const defaultConfig: NextConfig = {
: false,
webpackBuildWorker: undefined,
missingSuspenseWithCSRBailout: true,
optimizeServerReact: false,
optimizeServerReact: true,
useEarlyImport: false,
mergeCssChunks: true,
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment