Skip to content

Commit 9301c05

Browse files
GamePad64vados-cosmonic
authored andcommitted
fix(transpile): don't rebuild jco in debug during the vendor step
`setup:jco:vendor` began by running `setup:jco:build` (the debug jco build), then copied `../jco/obj/*` into `vendor/`. On the release path (`prepack` -> `build:release` -> `build:vendor:release`), that rebuild overwrote the freshly-built release `obj/` with a debug build before vendoring — so every publish shipped the ~133 MB debug `js-component-bindgen-component.core.wasm` (full DWARF) instead of the release build (~24 MB, ~4.6 MB gzipped). For jco-transpile's in-browser consumers that means a much larger download and a slower (opt-level 0) transpiler. The vendor step should only copy; its callers (`build:vendor` / `build:vendor:release`) already build the correct profile. Drop the debug rebuild so the release path vendors the release artifacts. Signed-off-by: Alexander Shishenko <alex@shishenko.com>
1 parent 1ca9d29 commit 9301c05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/jco-transpile/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"scripts": {
5252
"setup:jco:build": "pnpm run --filter '@bytecodealliance/jco' build",
5353
"setup:jco:build:release": "pnpm run --filter '@bytecodealliance/jco' build:release",
54-
"setup:jco:vendor": "pnpm run setup:jco:build && cp ../jco/obj/*.core*.wasm vendor && cp ../jco/obj/*.js vendor && cp ../jco/obj/*.ts vendor && cp -r ../jco/obj/interfaces vendor",
54+
"setup:jco:vendor": "cp ../jco/obj/*.core*.wasm vendor && cp ../jco/obj/*.js vendor && cp ../jco/obj/*.ts vendor && cp -r ../jco/obj/interfaces vendor",
5555
"build:vendor": "pnpm run setup:jco:build && pnpm run setup:jco:vendor",
5656
"build:vendor:release": "pnpm run setup:jco:build:release && pnpm run setup:jco:vendor",
5757
"fmt": "oxfmt",

0 commit comments

Comments
 (0)