fix(next-swc): correctly set wasm fallback for known target triples (#64567)
### What Fixes a regression to enable wasm fallback for the know target triples (that does not have native bindings). The condition was skewed when introducing `useWasmBinary` flag. Closes PACK-2969
This commit is contained in:
parent
ce69d02cf9
commit
cc4f7f204e
1 changed files with 4 additions and 1 deletions
|
@ -227,8 +227,11 @@ export async function loadBindings(
|
|||
!!triple?.raw && knownDefaultWasmFallbackTriples.includes(triple.raw)
|
||||
)
|
||||
const isWebContainer = process.versions.webcontainer
|
||||
// Normal execution relies on the param `useWasmBinary` flag to load, but
|
||||
// in certain cases where there isn't a native binary we always load wasm fallback first.
|
||||
const shouldLoadWasmFallbackFirst =
|
||||
(!disableWasmFallback && unsupportedPlatform && useWasmBinary) ||
|
||||
(!disableWasmFallback && useWasmBinary) ||
|
||||
unsupportedPlatform ||
|
||||
isWebContainer
|
||||
|
||||
if (!unsupportedPlatform && useWasmBinary) {
|
||||
|
|
Loading…
Reference in a new issue