next.js
69f805c3 - Turbopack: Add PURE comments for FreeVarReference::EcmaScriptModule (#80902)

Commit
270 days ago
Turbopack: Add PURE comments for FreeVarReference::EcmaScriptModule (#80902) Ideally, we'd refactor `Effect`s so that overlapping effects (i.e. `process.env.NODE_ENV` inlining and polyfilling the `process` variable in the browser context) don't run twice. But this lessens the impact by making ```js console.log(process.env.NODE_ENV); ``` produce ```js var __TURBOPACK_imported_$process = /*@__PURE__*/ __turbopack_import__("[project]/node_modules/process/index.js"); console.log("production)"; ``` so that the minifier can get rid of the import (even though the module will still be bundled).
Author
Parents
Loading