Skip to content

Commit

Permalink
Change to loadBindings for swc parse (#35171)
Browse files Browse the repository at this point in the history
CI test `TEST_WASM=true xvfb-run node run-tests.js test/integration/production/test/index.test.js` is aways failing in recent PRs

`loadBindingsSync` does not import `next-swc/wasm` unlike `loadBindings`

x-ref: https://github.com/vercel/next.js/runs/5479076388?check_suite_focus=true
x-ref: https://github.com/vercel/next.js/runs/5471650765?check_suite_focus=true
  • Loading branch information
huozhi committed Mar 9, 2022
1 parent 55c063e commit 6646ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/build/swc/index.js
Expand Up @@ -229,7 +229,7 @@ export async function bundle(options) {
}

export async function parse(src, options) {
let bindings = loadBindingsSync()
let bindings = await loadBindings()
let parserOptions = getParserOptions(options)
return bindings.parse(src, parserOptions).then((astStr) => JSON.parse(astStr))
}

0 comments on commit 6646ffa

Please sign in to comment.