Unverified Commit 5fb26562 authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

fix(next-swc): load wasm fallback if native bindings fail to load (#65623)

### What

This PR fixes regressions introduced at
https://github.com/vercel/next.js/pull/57437/files#diff-907b7be0cfc75bd37773e5ebc38d1deffa40861b8ac1cde92e4992e284a1ee59L245,
which removes to try load wasm fallback if 1. platform is supported 2.
fail to load native bindings for some reason.
parent 2c53133a
......@@ -274,6 +274,14 @@ export async function loadBindings(
attempts = attempts.concat(a)
}
// For these platforms we already tried to load wasm and failed, skip reattempt
if (!shouldLoadWasmFallbackFirst && !disableWasmFallback) {
const fallbackBindings = await tryLoadWasmWithFallback(attempts)
if (fallbackBindings) {
return resolve(fallbackBindings)
}
}
logLoadFailure(attempts, true)
})
return pendingBindings
......
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