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({ ...@@ -408,7 +408,7 @@ export function getLoaderSWCOptions({
if (optimizeServerReact && isServer && !development) { if (optimizeServerReact && isServer && !development) {
baseOptions.optimizeServerReact = { baseOptions.optimizeServerReact = {
optimize_use_state: true, optimize_use_state: false,
} }
} }
......
...@@ -912,7 +912,7 @@ export const defaultConfig: NextConfig = { ...@@ -912,7 +912,7 @@ export const defaultConfig: NextConfig = {
: false, : false,
webpackBuildWorker: undefined, webpackBuildWorker: undefined,
missingSuspenseWithCSRBailout: true, missingSuspenseWithCSRBailout: true,
optimizeServerReact: false, optimizeServerReact: true,
useEarlyImport: false, useEarlyImport: false,
mergeCssChunks: true, 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