Merge pull request 'chore(build): ship only the DTLN files that can load (-9 MB) (#210)' (#470) from chore/build-hygiene into lotus
CI / Build & Quality Checks (push) Successful in 3m41s
CI / Docker image build & smoke test (push) Skipped
CI / Secret scan (gitleaks) (push) Successful in 18s
CI / Trigger Desktop Build (push) Successful in 6s
CI / Playwright smoke (e2e) (push) Successful in 29m27s

This commit was merged in pull request #470.
This commit is contained in:
2026-10-25 22:48:04 -04:00
+11 -1
View File
@@ -189,7 +189,17 @@ function lotusDenoise() {
'Run `npm ci` to install @workadventure/noise-suppression.',
);
}
fs.cpSync(dtln[0], path.join(denoiseDir, dtln[1]), { recursive: true });
// [Gitea #210] Ship only what can load. The threaded LiteRT build is used
// only on a cross-origin-isolated page (COOP + COEP), and neither the web
// call page nor the desktop one is, so its ~9 MB never loads; source maps
// and type declarations aren't needed at runtime either. If the call page
// ever turns on COOP/COEP, drop the `threaded` exclusion.
const dtlnSkip = (src) =>
/litert_wasm_threaded_internal\./.test(src) || /\.(map|d\.ts)$/.test(src);
fs.cpSync(dtln[0], path.join(denoiseDir, dtln[1]), {
recursive: true,
filter: (src) => !dtlnSkip(src),
});
const dfnMissing = dfn.filter(([s]) => !fs.existsSync(s)).map(([s]) => s);
if (dfnMissing.length > 0) {