Skip to content

Commit

Permalink
only disable globals
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Feb 14, 2024
1 parent c3b4d8b commit 014a8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/build/swc/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export function getLoaderSWCOptions({
options.cjsRequireOptimizer = undefined
// Disable optimizer for node_modules in app browser layer, to avoid unnecessary replacement.
// e.g. typeof window could result differently in js worker or browser.
options.jsc.transform.optimizer = null
options.jsc.transform.optimizer.globals = null
}

return options
Expand Down

0 comments on commit 014a8b5

Please sign in to comment.