fix: force onnxruntime-web@1.18.0 via resolutions to eliminate nested 1.24.3

vad-web's own dependency was resolved to ort@1.24.3 (nested in its
node_modules), which only has threaded WASM requiring a .mjs dynamic
import that Vite fails to serve correctly. Pin ort to 1.18.0 via yarn
resolutions so all packages share the same copy with ort-wasm-simd.wasm
(non-threaded SIMD). Also remove the now-unnecessary COOP/COEP headers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mk
2026-03-23 23:48:44 -03:00
parent f2988cd689
commit 4a58277090
3 changed files with 1 additions and 33 deletions

View File

@@ -118,11 +118,6 @@ export default ({
key: fs.readFileSync("./backend/dev_tls_m.localhost.key"),
cert: fs.readFileSync("./backend/dev_tls_m.localhost.crt"),
},
// Required for SharedArrayBuffer (used by onnxruntime-web threaded WASM)
headers: {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
},
},
worker: {
format: "es",