Unverified Commit 27c9680c authored by Sam Poder's avatar Sam Poder Committed by GitHub

[turbopack] Enable CJS tree shaking by default (#96779)

just like https://github.com/vercel/next.js/pull/96778 - lets get this
into canary!
parent 2b11d569
...@@ -2495,11 +2495,7 @@ impl NextConfig { ...@@ -2495,11 +2495,7 @@ impl NextConfig {
#[turbo_tasks::function] #[turbo_tasks::function]
pub fn turbopack_cjs_tree_shaking(&self) -> Vc<bool> { pub fn turbopack_cjs_tree_shaking(&self) -> Vc<bool> {
Vc::cell( Vc::cell(self.experimental.turbopack_cjs_tree_shaking.unwrap_or(true))
self.experimental
.turbopack_cjs_tree_shaking
.unwrap_or(false),
)
} }
#[turbo_tasks::function] #[turbo_tasks::function]
......
...@@ -952,7 +952,7 @@ export interface ExperimentalConfig { ...@@ -952,7 +952,7 @@ export interface ExperimentalConfig {
/** /**
* Enable tree shaking of unused exports from analyzable CommonJS modules in Turbopack. * Enable tree shaking of unused exports from analyzable CommonJS modules in Turbopack.
* *
* Defaults to `false` * Defaults to `true`
*/ */
turbopackCjsTreeShaking?: boolean turbopackCjsTreeShaking?: 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