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.
This commit is contained in:
parent
2c53133ac5
commit
5fb2656225
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue