Unverified Commit 2257133e authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

fix(next-swc): correct path interop to filepath for wasm (#65633)

### What

For loading wasm, path interop to absolute file path occurs in here
(https://github.com/vercel/next.js/blob/canary/packages/next/src/build/swc/index.ts#L1249)
already so shouldn't pre-populate import path when call loading wasm to
make internal path operation
(https://github.com/vercel/next.js/blob/canary/packages/next/src/build/swc/index.ts#L1247)
work.
parent 505fc7b2
...@@ -337,7 +337,7 @@ async function tryLoadWasmWithFallback(attempts: any) { ...@@ -337,7 +337,7 @@ async function tryLoadWasmWithFallback(attempts: any) {
downloadWasmPromise = downloadWasmSwc(nextVersion, wasmDirectory) downloadWasmPromise = downloadWasmSwc(nextVersion, wasmDirectory)
} }
await downloadWasmPromise await downloadWasmPromise
let bindings = await loadWasm(pathToFileURL(wasmDirectory).href) let bindings = await loadWasm(wasmDirectory)
// @ts-expect-error TODO: this event has a wrong type. // @ts-expect-error TODO: this event has a wrong type.
eventSwcLoadFailure({ eventSwcLoadFailure({
wasm: 'fallback', wasm: 'fallback',
......
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