Unverified Commit 2317b28d authored by Sam Poder's avatar Sam Poder Committed by GitHub

[turbopack] Enable the shared runtime by default (#96778)

16.3 is out so we will test this in canary!
parent 27c9680c
...@@ -2558,7 +2558,7 @@ impl NextConfig { ...@@ -2558,7 +2558,7 @@ impl NextConfig {
// The shared runtime / inlined bootstrap is a production-only optimization; in // The shared runtime / inlined bootstrap is a production-only optimization; in
// development the per-route runtime is required for HMR. // development the per-route runtime is required for HMR.
NextMode::Development => false, NextMode::Development => false,
NextMode::Build => self.experimental.turbopack_shared_runtime.unwrap_or(false), NextMode::Build => self.experimental.turbopack_shared_runtime.unwrap_or(true),
})) }))
} }
......
...@@ -171,9 +171,8 @@ export function getDefineEnv({ ...@@ -171,9 +171,8 @@ export function getDefineEnv({
'process.env.__NEXT_APP_NAV_FAIL_HANDLING': Boolean( 'process.env.__NEXT_APP_NAV_FAIL_HANDLING': Boolean(
config.experimental.appNavFailHandling config.experimental.appNavFailHandling
), ),
'process.env.__NEXT_TURBOPACK_SHARED_RUNTIME': Boolean( 'process.env.__NEXT_TURBOPACK_SHARED_RUNTIME':
config.experimental.turbopackSharedRuntime config.experimental.turbopackSharedRuntime !== false,
),
'process.env.__NEXT_PPR': isPPREnabled, 'process.env.__NEXT_PPR': isPPREnabled,
'process.env.__NEXT_CACHE_COMPONENTS': isCacheComponentsEnabled, 'process.env.__NEXT_CACHE_COMPONENTS': isCacheComponentsEnabled,
'process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS': Boolean( 'process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS': Boolean(
......
...@@ -785,7 +785,7 @@ export interface ExperimentalConfig { ...@@ -785,7 +785,7 @@ export interface ExperimentalConfig {
/** /**
* Share the browser runtime across routes in a single `runtime.js` asset and inline the * Share the browser runtime across routes in a single `runtime.js` asset and inline the
* per-route chunk-group bootstrap into the HTML, dropping the per-route runtime. Defaults to * per-route chunk-group bootstrap into the HTML, dropping the per-route runtime. Defaults to
* false. Only applies to production builds; has no effect in development mode. * true. Only applies to production builds; has no effect in development mode.
*/ */
turbopackSharedRuntime?: boolean turbopackSharedRuntime?: boolean
......
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