You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build.mjs reads every binary asset as UTF-8 text before deciding it is not a script #174
Where:build.mjs (spliceAndCopy: const fileText = fs.readFileSync(file, 'utf8'); before the exclude check and the .mjs/.js branch)
What happens
ort-wasm-simd-threaded.wasm, silero_vad_half.onnx, the PNGs and the 3 MB dash.mjs are decoded as UTF-8 into a string that is then discarded, three times per build (three targets in Promise.all). Not a correctness bug (the copy uses copyFileSync), just the single slowest avoidable step of the build.
Suggested fix
Move the readFileSync inside the .mjs/.js branch, after the exclude check.
Confidence: high.
From a line-by-line code review of the tree at 41363fd (2026-10-02). Each claim above was checked against the source before filing; the reproduction steps and line references are as of that commit.
Activity