Turbopack: correctly reference injected variable for Wasm on Edge (#78771)
Closes PACK-4511 Concerning that we have test coverage for this never the deployment test never ran with Turbopack: https://github.com/vercel/next.js/pull/78768 This never (?) worked: ```js const wasm_vercel_og__resvg = require("..."); function loadWebAssemblyModule() { console.log(globalThis["wasm_vercel_og__resvg"]); // undefined } loadWebAssemblyModule(); ``` Webpack generates the following, so let's do that as well ```js const wasm_77d9faebf7af9e421806970ce10a58e9d83116d7 = require("/wasm/wasm_77d9faebf7af9e421806970ce10a58e9d83116d7.wasm"); ..... /***/ "(rsc)/../../node_modules/.pnpm/next@15.4.0-canary.12_react-dom@19.0.0_react@19.0.0/node_modules/next/dist/compiled/@vercel/og/resvg.wasm?module": /***/ ((module) => { module.exports = wasm_77d9faebf7af9e421806970ce10a58e9d83116d7; /***/ }), ```
Showing
This diff is collapsed.
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
Please
register
or
sign in
to comment