@@ -9,16 +9,17 @@ import { fileURLToPath } from 'node:url';
99
1010import sitemap from '@astrojs/sitemap' ;
1111
12- // @actcore /host imports jco's in-browser transpiler from a vendored bindgen at
12+ // @actcore /web-runtime imports jco's in-browser transpiler from a vendored bindgen at
1313// this subpath, which jco-transpile does not list in its package `exports`, so
1414// Vite/Rollup's resolver can't reach it — alias to the concrete file.
1515//
16- // TEMPORARY: point at a locally-built LTO bindgen instead of node_modules. The
17- // published jco-transpile ships a non-LTO bindgen (release CI reused a build
18- // cache; fixed upstream in bytecodealliance/jco#1737 but not yet released),
19- // which is 8.9 MiB / ~56s vs this 3.1 MiB / ~7.5s. Revert to the node_modules
20- // path once a fixed jco-transpile (> 0.4.1) publishes. See
21- // vendor/jco-bindgen-lto/README.md.
16+ // TEMPORARY: point at a locally-built bindgen instead of node_modules. The
17+ // published jco-transpile ships the *debug* js-component-bindgen (wasm-opt'd)
18+ // instead of the release build — a debug/release obj/ filename collision in
19+ // jco's build:release clobbers the release component with the 132 MiB debug one.
20+ // Result: 8.9 MiB / ~56s vs this 3.1 MiB / ~7.5s. Revert to the node_modules
21+ // path once upstream fixes the collision and republishes. See
22+ // vendor/jco-bindgen-lto/README.md for the verified root cause + rebuild recipe.
2223const jcoBindgen = fileURLToPath (
2324 new URL (
2425 './vendor/jco-bindgen-lto/js-component-bindgen-component.js' ,
@@ -39,7 +40,7 @@ export default defineConfig({
3940 jcoBindgen ,
4041 } ,
4142 } ,
42- // @actcore /host runs jco's transpiler in a module Web Worker that
43+ // @actcore /web-runtime runs jco's transpiler in a module Web Worker that
4344 // dynamic-imports the bindgen core wasm — needs ES worker format.
4445 worker : { format : 'es' } ,
4546 // The vendored bindgen is a ~9MB minified module; sourcemap generation
@@ -48,9 +49,9 @@ export default defineConfig({
4849 build : { sourcemap : false } ,
4950 esbuild : { sourcemap : false } ,
5051 optimizeDeps : {
51- exclude : [ '@actcore/host ' , '@bytecodealliance/jco-transpile' ] ,
52+ exclude : [ '@actcore/web-runtime ' , '@bytecodealliance/jco-transpile' ] ,
5253 } ,
53- // @actcore /host is a linked dep (file:../host-browser) outside root; its
54+ // @actcore /web-runtime is a linked dep (file:../host-browser) outside root; its
5455 // worker entry is fetched at runtime in dev.
5556 server : { fs : { allow : [ '..' ] } } ,
5657 } ,
0 commit comments