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 committed May 10, 2024
1 parent 505fc7b commit 2257133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/build/swc/index.ts
Expand Up @@ -337,7 +337,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 2257133

Please sign in to comment.