From 6646ffad75e6792b6f00117765caabdd5dc85f00 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Wed, 9 Mar 2022 13:21:01 +0100 Subject: [PATCH] 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 --- packages/next/build/swc/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/build/swc/index.js b/packages/next/build/swc/index.js index 0f7dc5466a1c..29a32086c327 100644 --- a/packages/next/build/swc/index.js +++ b/packages/next/build/swc/index.js @@ -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)) }