Skip to content

fix(emitter): --run-before-main 모듈을 엔트리 직전에 강제 호출#686

Merged
ohah merged 1 commit into
mainfrom
fix/run-before-main-call
Apr 3, 2026
Merged

fix(emitter): --run-before-main 모듈을 엔트리 직전에 강제 호출#686
ohah merged 1 commit into
mainfrom
fix/run-before-main-call

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Apr 3, 2026

Summary

  • inject로 그래프에 포함되어도 import_records에 없으면 linker가 preamble을 생성하지 않는 문제 수정
  • emitter Phase 3에서 엔트리 모듈 출력 직전에 require_xxx()/init_xxx() 호출을 강제 삽입
  • InitializeCore.js가 엔트리 전에 반드시 실행되도록 보장

Test plan

  • 새 테스트 추가: require/init 호출이 엔트리 직전에 삽입되는지 regex로 검증
  • 기존 테스트 74개 + 신규 1개 = 75개 전체 통과

🤖 Generated with Claude Code

inject로 그래프에 포함되어도 import_records에 없으면 linker가 preamble을
생성하지 않는 문제 수정. emitter Phase 3에서 엔트리 모듈 출력 직전에
해당 모듈의 require_xxx()/init_xxx() 호출을 강제 삽입.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah added the bug Something isn't working label Apr 3, 2026
@ohah ohah self-assigned this Apr 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

Smoke Test Results (CI)

Smoke Test Results

Project ZTS Size Time esbuild Size Time rolldown Size Time rspack Size Time Output
lodash-es OK 46KB 24ms OK 64KB 55ms OK 99KB 325ms OK 122KB 124ms MATCH
preact OK 13KB 4ms OK 15KB 7ms OK 13KB 112ms OK 13KB 108ms MATCH
date-fns OK 37KB 133ms OK 47KB 43ms OK 77KB 128ms OK 102KB 151ms MATCH
uuid OK 2.2KB 4ms OK 2.1KB 7ms OK 2.0KB 111ms OK 3.9KB 107ms MATCH
zod OK 102KB 10ms OK 119KB 16ms OK 98KB 114ms OK 147KB 123ms MATCH
axios OK 346KB 19ms FAIL 436KB 33ms OK 399KB 131ms OK 411KB 152ms MATCH
toolkit OK 65KB 10ms OK 51KB 17ms OK 39KB 118ms OK 126KB 123ms MATCH
rxjs OK 328KB 21ms OK 367KB 36ms OK 308KB 146ms OK 325KB 140ms MATCH
immer OK 18KB 5ms OK 22KB 9ms OK 19KB 110ms OK 36KB 111ms MATCH
superjson OK 23KB 6ms OK 26KB 11ms OK 24KB 114ms OK 32KB 114ms MATCH
express OK 784KB 27ms OK 1138KB 59ms OK 908KB 161ms OK 917KB 167ms MATCH
react OK 53KB 5ms OK 64KB 9ms OK 53KB 108ms OK 18KB 108ms MATCH
commander OK 68KB 6ms OK 119KB 11ms OK 100KB 110ms OK 121KB 114ms MATCH
eventemitter3 OK 6.2KB 3ms OK 7.8KB 6ms OK 9.2KB 107ms OK 10KB 105ms MATCH
ms OK 3.1KB 2ms OK 4.3KB 6ms OK 4.0KB 104ms OK 5.0KB 103ms MATCH
dotenv OK 11KB 3ms OK 14KB 6ms OK 12KB 104ms OK 14KB 106ms MATCH
jsonwebtoken OK 117KB 10ms OK 137KB 19ms OK 141KB 119ms OK 159KB 118ms MATCH
bcryptjs OK 32KB 5ms OK 46KB 9ms OK 47KB 115ms OK 60KB 108ms MATCH
clsx OK 0.6KB 2ms OK 0.6KB 6ms OK 0.7KB 102ms OK 1.5KB 105ms MATCH
tiny-invariant OK 0.5KB 2ms OK 0.6KB 6ms OK 0.6KB 110ms OK 1.5KB 104ms MATCH
tanstack-query OK 47KB 6ms OK 57KB 12ms OK 49KB 110ms OK 59KB 114ms MATCH
fast-glob OK 165KB 12ms OK 199KB 22ms OK 187KB 130ms OK 201KB 118ms MATCH
micromatch OK 81KB 7ms OK 100KB 12ms OK 100KB 112ms OK 108KB 111ms MATCH
semver OK 56KB 6ms OK 66KB 12ms OK 52KB 111ms OK 67KB 112ms MATCH
debug OK 19KB 4ms FAIL 25KB 8ms OK 24KB 106ms OK 28KB 110ms MATCH
chalk OK 13KB 3ms OK 15KB 7ms OK 14KB 109ms OK 17KB 107ms MATCH
yaml OK 210KB 12ms OK 261KB 20ms OK 228KB 126ms OK 284KB 121ms MATCH
yargs OK 167KB 11ms OK 185KB 17ms OK 167KB 122ms OK 227KB 125ms MATCH
effect OK 666KB 140ms OK 477KB 158ms OK 368KB 260ms OK 1460KB 237ms MATCH
vue OK 1634KB 73ms OK 2009KB 79ms OK 1606KB 241ms OK 1216KB 171ms MATCH
svelte OK 71KB 12ms OK 4.7KB 17ms OK 3.5KB 112ms OK 197KB 129ms MATCH
solid-js OK 0.3KB 4ms OK 2.4KB 8ms OK 2.2KB 104ms OK 23KB 110ms MATCH
three OK 246KB 62ms OK 296KB 92ms OK 276KB 176ms OK 1280KB 242ms MATCH
graphql OK 55KB 13ms OK 604KB 33ms OK 547KB 144ms OK 100KB 117ms MATCH
supabase OK 312KB 19ms OK 759KB 30ms OK 706KB 148ms OK 779KB 146ms MATCH
mobx OK 135KB 12ms OK 271KB 22ms OK 234KB 135ms OK 190KB 129ms MATCH
jotai OK 21KB 5ms OK 23KB 8ms OK 20KB 115ms OK 26KB 111ms MATCH
mitt OK 0.5KB 3ms OK 0.6KB 6ms OK 0.7KB 108ms OK 1.5KB 105ms MATCH
zustand OK 1.1KB 2ms OK 1.2KB 6ms OK 1.3KB 103ms OK 2.3KB 104ms MATCH
valtio OK 6.8KB 4ms OK 7.5KB 8ms OK 8.3KB 116ms OK 24KB 110ms MATCH
react-dom OK 1110KB 30ms OK 1355KB 40ms OK 1116KB 185ms OK 534KB 130ms MATCH
d3 OK 115KB 39ms OK 100KB 72ms OK 96KB 162ms OK 150KB 184ms MATCH
hono OK 43KB 8ms OK 59KB 11ms OK 52KB 119ms OK 68KB 113ms MATCH
dayjs OK 11KB 3ms OK 14KB 7ms OK 11KB 103ms OK 8.9KB 107ms MATCH
nanoid OK 0.8KB 3ms OK 0.9KB 6ms OK 0.9KB 101ms OK 2.6KB 115ms MATCH
zlib OK 97KB 14ms OK 112KB 20ms OK 102KB 123ms OK 222KB 127ms MATCH
fp-ts OK 8.8KB 6ms OK 70KB 17ms OK 100KB 115ms OK 50KB 116ms MATCH
neverthrow OK 11KB 3ms OK 18KB 7ms OK 13KB 109ms OK 19KB 119ms MATCH
drizzle-orm OK 20KB 41ms OK 30KB 27ms OK 14KB 115ms OK 35KB 121ms MATCH
tslib OK 0.8KB 4ms OK 0.8KB 6ms OK 0.8KB 113ms OK 18KB 108ms MATCH
iconv-lite OK 300KB 7ms OK 543KB 13ms OK 319KB 115ms OK 325KB 114ms MATCH
qs OK 78KB 9ms OK 95KB 22ms OK 81KB 115ms OK 92KB 113ms MATCH
change-case OK 3.1KB 3ms OK 3.2KB 6ms OK 3.3KB 102ms OK 8.0KB 107ms MATCH
path-to-regexp OK 11KB 3ms OK 14KB 6ms OK 8.0KB 105ms OK 15KB 104ms MATCH
mime-types OK 178KB 8ms OK 235KB 13ms OK 198KB 111ms OK 164KB 128ms MATCH
ajv OK 209KB 12ms OK 243KB 20ms OK 208KB 128ms OK 239KB 124ms MATCH
cac OK 17KB 4ms OK 18KB 8ms OK 16KB 112ms OK 19KB 111ms MATCH
defu OK 1.9KB 3ms OK 2.1KB 5ms OK 1.8KB 106ms OK 3.0KB 105ms MATCH
pathe OK 14KB 4ms OK 3.4KB 7ms OK 3.0KB 104ms OK 13KB 109ms MATCH
destr OK 2.0KB 2ms OK 2.1KB 6ms OK 1.8KB 110ms OK 3.1KB 105ms MATCH
hookable OK 5.3KB 3ms OK 5.9KB 6ms OK 5.2KB 110ms OK 9.3KB 107ms MATCH
minimatch OK 46KB 6ms OK 56KB 12ms OK 47KB 113ms OK 90KB 115ms MATCH
cheerio OK 1735KB 50ms OK 2186KB 87ms OK 1747KB 244ms OK 2387KB 210ms MATCH
is-glob OK 4.5KB 3ms OK 6.4KB 7ms OK 4.9KB 114ms OK 6.0KB 106ms MATCH
glob-parent OK 5.8KB 3ms OK 8.4KB 7ms OK 6.3KB 103ms OK 7.9KB 106ms MATCH
escape-string-regexp OK 0.3KB 2ms OK 0.4KB 6ms OK 0.4KB 101ms OK 1.5KB 104ms MATCH
fast-deep-equal OK 1.9KB 2ms OK 2.9KB 6ms OK 2.3KB 109ms OK 3.2KB 103ms MATCH
deepmerge OK 4.4KB 3ms OK 5.5KB 6ms OK 4.5KB 115ms OK 6.0KB 105ms MATCH
color-convert OK 25KB 5ms OK 30KB 8ms OK 27KB 108ms OK 27KB 108ms MATCH
picomatch OK 48KB 5ms OK 58KB 9ms OK 55KB 111ms OK 61KB 107ms MATCH
type-is OK 185KB 9ms OK 244KB 15ms OK 210KB 118ms OK 179KB 130ms MATCH
object-assign OK 2.6KB 3ms OK 3.8KB 5ms OK 2.8KB 110ms OK 4.3KB 102ms MATCH
has-flag OK 0.4KB 2ms OK 0.5KB 6ms OK 1.5KB 106ms OK 1.7KB 105ms MATCH
p-limit OK 2.6KB 3ms OK 3.0KB 6ms OK 2.7KB 103ms OK 5.2KB 108ms MATCH
strip-ansi OK 0.7KB 3ms OK 0.8KB 6ms OK 0.8KB 107ms OK 2.2KB 106ms MATCH
ansi-regex OK 0.4KB 2ms OK 0.5KB 5ms OK 0.4KB 105ms OK 1.8KB 104ms MATCH
wrap-ansi OK 32KB 4ms OK 35KB 10ms OK 34KB 109ms OK 38KB 109ms MATCH
supports-color OK 3.6KB 3ms OK 3.8KB 6ms OK 4.6KB 102ms OK 5.7KB 107ms MATCH
cross-spawn OK 14KB 4ms OK 18KB 9ms OK 15KB 111ms OK 19KB 109ms MATCH
lru-cache OK 21KB 4ms OK 23KB 8ms OK 22KB 107ms OK 18KB 109ms MATCH
signal-exit OK 5.2KB 3ms OK 6.8KB 7ms OK 6.5KB 112ms OK 12KB 106ms MATCH
which OK 7.4KB 3ms OK 9.5KB 8ms OK 7.7KB 112ms OK 8.7KB 106ms MATCH
string-width OK 23KB 4ms OK 25KB 8ms OK 25KB 110ms OK 27KB 108ms MATCH
safe-buffer OK 2.3KB 2ms OK 3.8KB 5ms OK 1.7KB 103ms OK 3.8KB 104ms MATCH
bytes OK 3.0KB 3ms OK 4.3KB 6ms OK 4.3KB 103ms OK 5.5KB 103ms MATCH
depd OK 9.2KB 3ms OK 12KB 6ms OK 11KB 103ms OK 13KB 104ms MATCH
merge-descriptors OK 1.5KB 2ms OK 2.3KB 5ms OK 1.8KB 103ms OK 2.9KB 102ms MATCH
content-type OK 4.0KB 3ms OK 5.3KB 6ms OK 4.2KB 104ms OK 6.0KB 103ms MATCH
cookie OK 7.8KB 3ms OK 9.8KB 6ms OK 5.6KB 104ms OK 13KB 104ms MATCH
on-finished OK 4.8KB 3ms OK 6.9KB 7ms OK 6.6KB 111ms OK 8.3KB 104ms MATCH
statuses OK 4.1KB 3ms OK 5.8KB 6ms OK 5.3KB 103ms OK 6.1KB 104ms MATCH
etag OK 2.4KB 2ms OK 3.7KB 6ms OK 3.3KB 108ms OK 4.6KB 105ms MATCH
vary OK 2.6KB 3ms OK 3.7KB 6ms OK 3.5KB 106ms OK 5.1KB 105ms MATCH
flat OK 1.2KB 3ms OK 1.3KB 5ms OK 1.2KB 108ms OK 4.9KB 106ms MATCH
retry OK 6.8KB 3ms OK 8.6KB 6ms OK 7.0KB 108ms OK 7.3KB 104ms MATCH
camelcase OK 3.5KB 3ms OK 3.7KB 6ms OK 3.5KB 105ms OK 4.5KB 105ms MATCH
decamelize OK 1.2KB 3ms OK 1.3KB 5ms OK 1.3KB 103ms OK 3.0KB 105ms MATCH
memoize-one OK 1.2KB 2ms OK 3.1KB 7ms OK 2.3KB 105ms OK 2.4KB 106ms MATCH
rfdc OK 6.5KB 3ms OK 8.2KB 6ms OK 6.4KB 106ms OK 7.7KB 104ms MATCH
ohash OK 3.6KB 3ms OK 4.1KB 6ms OK 3.9KB 106ms OK 4.6KB 107ms MATCH
nanoevents OK 0.5KB 2ms OK 0.5KB 6ms OK 0.5KB 117ms OK 1.6KB 117ms MATCH
typebox OK 104KB 16ms OK 116KB 27ms OK 123KB 126ms OK 182KB 147ms MATCH
ts-pattern OK 10KB 4ms OK 12KB 8ms OK 11KB 103ms OK 9.6KB 107ms MATCH
valibot OK 5.9KB 11ms OK 6.8KB 15ms OK 8.0KB 111ms OK 193KB 125ms MATCH
ts-results-es OK 19KB 4ms OK 22KB 7ms OK 26KB 105ms OK 34KB 107ms MATCH
remeda OK 2.1KB 12ms OK 2.2KB 18ms OK 2.1KB 111ms OK 3.3KB 116ms MATCH
nanostores OK 4.9KB 3ms OK 5.7KB 7ms OK 5.1KB 112ms OK 8.2KB 108ms MATCH
ky OK 26KB 5ms OK 30KB 9ms OK 30KB 114ms OK 49KB 112ms MATCH
typedi OK 13KB 4ms OK 27KB 8ms OK 28KB 115ms OK 25KB 110ms MATCH
io-ts OK 23KB 8ms OK 104KB 15ms OK 117KB 118ms OK 102KB 120ms MATCH
type-fest OK 0.1KB 2ms OK 0.1KB 5ms OK 0.1KB 102ms OK 0.9KB 104ms MATCH
arktype OK 258KB 19ms OK 297KB 30ms OK 273KB 135ms OK 382KB 152ms MATCH
kysely OK 225KB 22ms OK 371KB 39ms OK 357KB 145ms OK 471KB 167ms MATCH
lodash-es@es5 OK 13KB 21ms OK 18KB 53ms OK 28KB 140ms FAIL - 0ms MATCH
clsx@es5 OK 1.0KB 2ms OK 0.6KB 5ms OK 0.6KB 103ms FAIL - 0ms MATCH
ms@es5 OK 3.5KB 3ms OK 4.5KB 5ms OK 4.0KB 109ms FAIL - 0ms MATCH
deepmerge@es5 OK 4.8KB 3ms OK 5.7KB 6ms OK 4.5KB 110ms FAIL - 0ms MATCH
fast-deep-equal@es5 OK 2.4KB 2ms OK 3.0KB 6ms OK 2.3KB 106ms FAIL - 0ms MATCH
semver@es5 FAIL 58KB 6ms FAIL - 11ms OK 52KB 117ms FAIL - 0ms -
lodash-es@es2015 OK 13KB 21ms OK 18KB 55ms OK 28KB 140ms FAIL - 0ms MATCH
superjson@es2015 OK 23KB 5ms OK 27KB 11ms OK 24KB 111ms FAIL - 0ms MATCH
flat@es2017 OK 1.2KB 3ms OK 1.3KB 6ms OK 1.2KB 102ms FAIL - 0ms MATCH
defu@es2017 OK 1.9KB 3ms OK 2.8KB 5ms OK 1.8KB 102ms FAIL - 0ms MATCH
picomatch@es2018 OK 48KB 5ms OK 58KB 9ms OK 55KB 111ms FAIL - 0ms MATCH
semver@es2019 OK 56KB 6ms OK 66KB 12ms OK 52KB 110ms FAIL - 0ms MATCH
clsx@es2019 OK 0.5KB 2ms OK 0.6KB 5ms OK 0.6KB 113ms FAIL - 0ms MATCH
nanoid@es2019 OK 0.8KB 3ms OK 1.0KB 6ms OK 0.9KB 104ms FAIL - 0ms MATCH
dayjs@es2020 OK 11KB 3ms OK 14KB 6ms OK 11KB 106ms FAIL - 0ms MATCH
ohash@es2020 OK 3.7KB 3ms OK 4.8KB 7ms OK 3.9KB 112ms FAIL - 0ms MATCH
lru-cache@es2021 FAIL 25KB 4ms OK 35KB 9ms OK 22KB 107ms FAIL - 0ms -
nanostores@es2021 OK 1.8KB 3ms OK 2.3KB 7ms OK 1.9KB 105ms FAIL - 0ms MATCH
lodash-es@chrome80 OK 46KB 22ms OK 64KB 55ms OK 99KB 141ms FAIL - 0ms MATCH
clsx@chrome49 OK 1.0KB 2ms OK 0.6KB 6ms OK 0.7KB 103ms FAIL - 0ms MATCH
dayjs@safari14 OK 11KB 3ms OK 14KB 7ms OK 11KB 105ms FAIL - 0ms MATCH
nanoid@node16 OK 0.8KB 3ms OK 0.9KB 6ms OK 0.9KB 107ms FAIL - 0ms DIFF

Size Comparison (ZTS vs esbuild)

Project ZTS esbuild rolldown rspack Ratio Status
svelte 71KB 4.7KB 3.5KB 197KB 15.28x
pathe 14KB 3.4KB 3.0KB 13KB 3.96x
clsx@es5 1.0KB 0.6KB 0.6KB - 1.57x
clsx@chrome49 1.0KB 0.6KB 0.7KB - 1.56x
effect 666KB 477KB 368KB 1460KB 1.40x ⚠️
toolkit 65KB 51KB 39KB 126KB 1.28x ⚠️
type-fest 0.1KB 0.1KB 0.1KB 0.9KB 1.18x ⚠️
d3 115KB 100KB 96KB 150KB 1.15x ⚠️
uuid 2.2KB 2.1KB 2.0KB 3.9KB 1.05x
remeda 2.1KB 2.2KB 2.1KB 3.3KB 0.97x
camelcase 3.5KB 3.7KB 3.5KB 4.5KB 0.96x
change-case 3.1KB 3.2KB 3.3KB 8.0KB 0.95x
string-width 23KB 25KB 25KB 27KB 0.94x
destr 2.0KB 2.1KB 1.8KB 3.1KB 0.94x
supports-color 3.6KB 3.8KB 4.6KB 5.7KB 0.94x
flat@es2017 1.2KB 1.3KB 1.2KB - 0.94x
flat 1.2KB 1.3KB 1.2KB 4.9KB 0.94x
zustand 1.1KB 1.2KB 1.3KB 2.3KB 0.93x
decamelize 1.2KB 1.3KB 1.3KB 3.0KB 0.93x
tslib 0.8KB 0.8KB 0.8KB 18KB 0.93x
lru-cache 21KB 23KB 22KB 18KB 0.92x
cac 17KB 18KB 16KB 19KB 0.92x
wrap-ansi 32KB 35KB 34KB 38KB 0.92x
has-flag 0.4KB 0.5KB 1.5KB 1.7KB 0.92x
valtio 6.8KB 7.5KB 8.3KB 24KB 0.91x
ansi-regex 0.4KB 0.5KB 0.4KB 1.8KB 0.91x
hookable 5.3KB 5.9KB 5.2KB 9.3KB 0.91x
yargs 167KB 185KB 167KB 227KB 0.90x
clsx 0.6KB 0.6KB 0.7KB 1.5KB 0.90x
jotai 21KB 23KB 20KB 26KB 0.90x
clsx@es2019 0.5KB 0.6KB 0.6KB - 0.90x
rxjs 328KB 367KB 308KB 325KB 0.90x
defu 1.9KB 2.1KB 1.8KB 3.0KB 0.89x
typebox 104KB 116KB 123KB 182KB 0.89x
ts-pattern 10KB 12KB 11KB 9.6KB 0.89x
superjson 23KB 26KB 24KB 32KB 0.89x
ohash 3.6KB 4.1KB 3.9KB 4.6KB 0.88x
ky 26KB 30KB 30KB 49KB 0.88x
strip-ansi 0.7KB 0.8KB 0.8KB 2.2KB 0.88x
superjson@es2015 23KB 27KB 24KB - 0.87x
zlib 97KB 112KB 102KB 222KB 0.87x
chalk 13KB 15KB 14KB 17KB 0.87x
arktype 258KB 297KB 273KB 382KB 0.87x
tiny-invariant 0.5KB 0.6KB 0.6KB 1.5KB 0.87x
valibot 5.9KB 6.8KB 8.0KB 193KB 0.87x
p-limit 2.6KB 3.0KB 2.7KB 5.2KB 0.86x
preact 13KB 15KB 13KB 13KB 0.86x
ts-results-es 19KB 22KB 26KB 34KB 0.86x
ajv 209KB 243KB 208KB 239KB 0.86x
zod 102KB 119KB 98KB 147KB 0.86x
nanostores 4.9KB 5.7KB 5.1KB 8.2KB 0.85x
mitt 0.5KB 0.6KB 0.7KB 1.5KB 0.85x
deepmerge@es5 4.8KB 5.7KB 4.5KB - 0.85x
jsonwebtoken 117KB 137KB 141KB 159KB 0.85x
nanoevents 0.5KB 0.5KB 0.5KB 1.6KB 0.85x
semver@es2019 56KB 66KB 52KB - 0.84x
semver 56KB 66KB 52KB 67KB 0.84x
immer 18KB 22KB 19KB 36KB 0.84x
three 246KB 296KB 276KB 1280KB 0.83x
color-convert 25KB 30KB 27KB 27KB 0.83x
fast-glob 165KB 199KB 187KB 201KB 0.83x
react 53KB 64KB 53KB 18KB 0.83x
qs 78KB 95KB 81KB 92KB 0.82x
tanstack-query 47KB 57KB 49KB 59KB 0.82x
picomatch@es2018 48KB 58KB 55KB - 0.82x
picomatch 48KB 58KB 55KB 61KB 0.82x
react-dom 1110KB 1355KB 1116KB 534KB 0.82x
micromatch 81KB 100KB 100KB 108KB 0.82x
vue 1634KB 2009KB 1606KB 1216KB 0.81x
escape-string-regexp 0.3KB 0.4KB 0.4KB 1.5KB 0.81x
minimatch 46KB 56KB 47KB 90KB 0.81x
path-to-regexp 11KB 14KB 8.0KB 15KB 0.81x
yaml 210KB 261KB 228KB 284KB 0.80x
nanoid@es2019 0.8KB 1.0KB 0.9KB - 0.80x
cookie 7.8KB 9.8KB 5.6KB 13KB 0.80x
deepmerge 4.4KB 5.5KB 4.5KB 6.0KB 0.80x
nanoid 0.8KB 0.9KB 0.9KB 2.6KB 0.80x
dotenv 11KB 14KB 12KB 14KB 0.80x
nanoid@node16 0.8KB 0.9KB 0.9KB - 0.80x
nanostores@es2021 1.8KB 2.3KB 1.9KB - 0.80x
eventemitter3 6.2KB 7.8KB 9.2KB 10KB 0.80x
cheerio 1735KB 2186KB 1747KB 2387KB 0.79x
rfdc 6.5KB 8.2KB 6.4KB 7.7KB 0.79x
date-fns 37KB 47KB 77KB 102KB 0.79x
ms@es5 3.5KB 4.5KB 4.0KB - 0.79x
retry 6.8KB 8.6KB 7.0KB 7.3KB 0.79x
depd 9.2KB 12KB 11KB 13KB 0.79x
cross-spawn 14KB 18KB 15KB 19KB 0.78x
which 7.4KB 9.5KB 7.7KB 8.7KB 0.78x
fast-deep-equal@es5 2.4KB 3.0KB 2.3KB - 0.77x
signal-exit 5.2KB 6.8KB 6.5KB 12KB 0.77x
ohash@es2020 3.7KB 4.8KB 3.9KB - 0.77x
dayjs@es2020 11KB 14KB 11KB - 0.77x
dayjs 11KB 14KB 11KB 8.9KB 0.77x
dayjs@safari14 11KB 14KB 11KB - 0.77x
type-is 185KB 244KB 210KB 179KB 0.76x
mime-types 178KB 235KB 198KB 164KB 0.76x
content-type 4.0KB 5.3KB 4.2KB 6.0KB 0.75x
hono 43KB 59KB 52KB 68KB 0.73x
ms 3.1KB 4.3KB 4.0KB 5.0KB 0.72x
lodash-es@chrome80 46KB 64KB 99KB - 0.72x
lodash-es 46KB 64KB 99KB 122KB 0.72x
statuses 4.1KB 5.8KB 5.3KB 6.1KB 0.72x
bytes 3.0KB 4.3KB 4.3KB 5.5KB 0.72x
lodash-es@es2015 13KB 18KB 28KB - 0.70x
lodash-es@es5 13KB 18KB 28KB - 0.70x
vary 2.6KB 3.7KB 3.5KB 5.1KB 0.70x
is-glob 4.5KB 6.4KB 4.9KB 6.0KB 0.70x
bcryptjs 32KB 46KB 47KB 60KB 0.69x
on-finished 4.8KB 6.9KB 6.6KB 8.3KB 0.69x
object-assign 2.6KB 3.8KB 2.8KB 4.3KB 0.69x
express 784KB 1138KB 908KB 917KB 0.69x
glob-parent 5.8KB 8.4KB 6.3KB 7.9KB 0.69x
defu@es2017 1.9KB 2.8KB 1.8KB - 0.68x
fast-deep-equal 1.9KB 2.9KB 2.3KB 3.2KB 0.68x
drizzle-orm 20KB 30KB 14KB 35KB 0.67x
etag 2.4KB 3.7KB 3.3KB 4.6KB 0.65x
merge-descriptors 1.5KB 2.3KB 1.8KB 2.9KB 0.64x
neverthrow 11KB 18KB 13KB 19KB 0.62x
safe-buffer 2.3KB 3.8KB 1.7KB 3.8KB 0.62x
kysely 225KB 371KB 357KB 471KB 0.61x
commander 68KB 119KB 100KB 121KB 0.57x
iconv-lite 300KB 543KB 319KB 325KB 0.55x
mobx 135KB 271KB 234KB 190KB 0.50x
typedi 13KB 27KB 28KB 25KB 0.49x
supabase 312KB 759KB 706KB 779KB 0.41x
memoize-one 1.2KB 3.1KB 2.3KB 2.4KB 0.39x
io-ts 23KB 104KB 117KB 102KB 0.22x
solid-js 0.3KB 2.4KB 2.2KB 23KB 0.14x
fp-ts 8.8KB 70KB 100KB 50KB 0.13x
graphql 55KB 604KB 547KB 100KB 0.09x

Average ratio: 0.94x | Smaller: 122 | Similar(±10%): 1 | Larger: 8

Auto-generated by CI on 2026-04-03 11:39 UTC

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 3, 2026

Benchmark Results (CI)

macos-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 5 3 6 1.0x
esbuild 7 6 9 1.4x
Bun 7 6 10 1.4x
oxc (node) 76 67 84 15.2x
SWC 171 144 215 34.2x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 6 5 8 1.0x
esbuild 6 5 8 1.0x
Bun 10 8 13 1.7x
oxc (node) 89 74 117 14.8x
SWC 150 142 161 25.0x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 6 5 6 1.0x
ZTS 13 10 16 2.2x
Bun 13 12 16 2.2x
oxc (node) 88 76 105 14.7x
SWC 146 137 153 24.3x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 4 4 4 1.0x
esbuild 10 9 12 2.5x
Bun 11 8 14 2.8x
rspack 215 152 391 53.8x
rolldown 275 224 343 68.8x
webpack 524 477 558 131.0x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 6 4 10 1.0x
Bun 10 9 11 1.7x
esbuild 15 12 18 2.5x
rspack 161 144 193 26.8x
rolldown 242 226 268 40.3x
webpack 496 438 555 82.7x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 6 6 7 1.0x
Bun 13 10 17 2.2x
esbuild 15 12 20 2.5x
rolldown 261 220 308 43.5x

ubuntu-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 1 1 2 1.0x
esbuild 2 1 2 2.0x
Bun 2 2 2 2.0x
oxc (node) 25 24 25 25.0x
SWC 78 75 79 78.0x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 1 2 1.0x
ZTS 3 3 3 1.5x
Bun 3 3 4 1.5x
oxc (node) 25 24 25 12.5x
SWC 80 77 83 40.0x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 1 2 1.0x
Bun 8 8 9 4.0x
ZTS 13 12 13 6.5x
oxc (node) 25 24 26 12.5x
SWC 101 98 104 50.5x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 2 2 2 1.0x
Bun 3 3 3 1.5x
esbuild 5 5 5 2.5x
rolldown 95 92 100 47.5x
rspack 97 96 98 48.5x
webpack 442 440 447 221.0x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 3 1.0x
Bun 4 4 4 1.3x
esbuild 6 6 6 2.0x
rolldown 99 95 102 33.0x
rspack 102 101 103 34.0x
webpack 447 440 452 149.0x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 6 6 6 1.0x
Bun 7 7 7 1.2x
esbuild 12 12 13 2.0x
rolldown 106 100 109 17.7x

windows-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 10 8 12 1.0x
Bun 17 16 17 1.7x
oxc (node) 60 59 61 6.0x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 11 11 12 1.0x
Bun 17 17 19 1.5x
oxc (node) 67 61 72 6.1x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
Bun 17 16 17 1.0x
ZTS 22 21 23 1.3x
oxc (node) 68 64 70 4.0x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 13 13 14 1.0x
Bun 32 29 34 2.5x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 18 17 19 1.0x
Bun 34 32 35 1.9x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 34 32 36 1.0x
Bun 44 44 45 1.3x

Auto-generated by CI on 2026-04-03 11:41 UTC

@ohah ohah merged commit 08abb72 into main Apr 3, 2026
18 checks passed
@ohah ohah deleted the fix/run-before-main-call branch April 3, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant