Skip to content

Commit

Permalink
fix(next-swc): correct path interop to filepath for wasm (#65633)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
kwonoj authored and huozhi committed Jul 9, 2024
1 parent 6c661d2 commit c64c61d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/build/swc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ async function tryLoadWasmWithFallback(attempts: any) {
downloadWasmPromise = downloadWasmSwc(nextVersion, wasmDirectory)
}
await downloadWasmPromise
let bindings = await loadWasm(pathToFileURL(wasmDirectory).href)
let bindings = await loadWasm(wasmDirectory)
// @ts-expect-error TODO: this event has a wrong type.
eventSwcLoadFailure({
wasm: 'fallback',
Expand Down

0 comments on commit c64c61d

Please sign in to comment.