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', 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;