Unverified Commit 6646ffad authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Change to loadBindings for swc parse (#35171)

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
parent 55c063ea
...@@ -229,7 +229,7 @@ export async function bundle(options) { ...@@ -229,7 +229,7 @@ export async function bundle(options) {
} }
export async function parse(src, options) { export async function parse(src, options) {
let bindings = loadBindingsSync() let bindings = await loadBindings()
let parserOptions = getParserOptions(options) let parserOptions = getParserOptions(options)
return bindings.parse(src, parserOptions).then((astStr) => JSON.parse(astStr)) return bindings.parse(src, parserOptions).then((astStr) => JSON.parse(astStr))
} }
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