next.js
fe98a848 - Turbopack: fix loading of externals on Edge (#72349)

Commit
1 year ago
Turbopack: fix loading of externals on Edge (#72349) - `__turbopack_external_require__("node:buffer")` becomes `__turbopack_external_require__("node:buffer", () => require("node:buffer"))`. - This way, running esbuild on the Turbopack output will correctly detect usage of Node builtins and is able to polyfill them - To make that `require` the global (non-shadowed) one, change the previous `t: require` item from `__turbopack_context__` to `t: __turbopack_require_real__` and the fake require added in https://github.com/vercel/next.js/pull/70255 to `__turbopack_stub_require_` Closes PACK-3389 --------- Co-authored-by: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
Author
Parents
Loading