Skip to content

Commit c64c61d

Browse files
kwonojhuozhi
authored andcommitted
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.
1 parent 6c661d2 commit c64c61d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/next/src/build/swc/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ async function tryLoadWasmWithFallback(attempts: any) {
325325
downloadWasmPromise = downloadWasmSwc(nextVersion, wasmDirectory)
326326
}
327327
await downloadWasmPromise
328-
let bindings = await loadWasm(pathToFileURL(wasmDirectory).href)
328+
let bindings = await loadWasm(wasmDirectory)
329329
// @ts-expect-error TODO: this event has a wrong type.
330330
eventSwcLoadFailure({
331331
wasm: 'fallback',

0 commit comments

Comments
 (0)