From c35835f16aad943090462b4d6a3e864954ef8472 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Mon, 6 Apr 2026 01:33:35 -0700 Subject: [PATCH 1/2] [web] fix a typo in pull prebuild wasm script --- js/web/script/pull-prebuilt-wasm-artifacts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/script/pull-prebuilt-wasm-artifacts.ts b/js/web/script/pull-prebuilt-wasm-artifacts.ts index 413f779dc908c..4f23b1f8d4920 100644 --- a/js/web/script/pull-prebuilt-wasm-artifacts.ts +++ b/js/web/script/pull-prebuilt-wasm-artifacts.ts @@ -153,7 +153,7 @@ async function downloadArtifactsForRun(run: any): Promise { if ( [ 'ort-wasm-simd-threaded.asyncify.mjs', - 'ort-wasm-simd-threaded.asyncify.mjs', + 'ort-wasm-simd-threaded.asyncify.wasm', 'ort-wasm-simd-threaded.jsep.mjs', 'ort-wasm-simd-threaded.jsep.wasm', 'ort-wasm-simd-threaded.jspi.mjs', From 5f935e708bed24198409b08d31d3cefcacc52758 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Mon, 6 Apr 2026 01:34:25 -0700 Subject: [PATCH 2/2] [wasm] add quote to avoid property name renaming --- onnxruntime/wasm/pre.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/onnxruntime/wasm/pre.js b/onnxruntime/wasm/pre.js index 636a9713519a7..f8a7fa0286403 100644 --- a/onnxruntime/wasm/pre.js +++ b/onnxruntime/wasm/pre.js @@ -47,5 +47,9 @@ Module["unmountExternalData"] = () => { */ var SharedArrayBuffer = globalThis.SharedArrayBuffer ?? - new WebAssembly.Memory({ initial: 0, maximum: 0, shared: true }).buffer - .constructor; + // prettier-ignore + // + // the line above is used to force prettier to skip formatting the next statement. + // this is because prettier will remove the quotes around the property names, but we need to keep them + // because otherwise closure compiler may rename them and break the code. + new WebAssembly.Memory({ "initial": 0, "maximum": 0, "shared": true }).buffer.constructor;