Skip to content

fix(transformer): export default class + ES5 + CJS에서 빈 값 출력 수정#603

Merged
ohah merged 1 commit into
mainfrom
fix/export-default-class-es5-cjs
Apr 2, 2026
Merged

fix(transformer): export default class + ES5 + CJS에서 빈 값 출력 수정#603
ohah merged 1 commit into
mainfrom
fix/export-default-class-es5-cjs

Conversation

@ohah
Copy link
Copy Markdown
Owner

@ohah ohah commented Apr 2, 2026

Summary

  • export default class Foo extends Event { ... } + ES5 타겟 + CJS → module.exports=; (빈 값) 버그 수정
  • lowerClassDeclaration이 class를 function으로 분해 후 .none 반환 시, 클래스 이름의 identifier reference로 operand 대체
  • 익명 클래스(export default class { })도 합성 이름 _Class로 처리
  • es_helpers.makeIdentifierRefFromSpan 헬퍼 재사용

Test plan

  • 회귀 테스트 3개 추가 (named, anonymous, extends)
  • zig build test 전체 통과
  • RN 앱에서 export default class 포함 번들 정상 동작 확인

🤖 Generated with Claude Code

… 빈 값 출력 수정

lowerClassDeclaration이 class를 function으로 분해하여 pending_nodes에 넣고
.none을 반환하면, export_default_declaration의 operand가 비어 module.exports=;가 됨.

- visitExportDefaultDeclaration 전용 visitor 추가
- operand가 .none이면 클래스/함수 이름의 identifier reference로 대체
- 익명 클래스(export default class {})도 합성 이름 _Class로 처리
- es_helpers.makeIdentifierRefFromSpan 헬퍼 재사용
- 회귀 테스트 3개 추가 (named, anonymous, extends)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohah ohah added the bug Something isn't working label Apr 2, 2026
@ohah ohah self-assigned this Apr 2, 2026
@ohah ohah merged commit 124bf36 into main Apr 2, 2026
13 checks passed
@ohah ohah deleted the fix/export-default-class-es5-cjs branch April 2, 2026 01:10
@github-actions
Copy link
Copy Markdown

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

Auto-generated by CI on 2026-04-02 01:13 UTC

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

Benchmark Results (CI)

macos-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 2 3 1.0x
esbuild 5 5 5 1.7x
Bun 7 6 8 2.3x
oxc (node) 88 60 101 29.3x
SWC 142 111 172 47.3x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 4 4 4 1.0x
esbuild 4 4 5 1.0x
Bun 9 8 11 2.3x
oxc (node) 74 69 88 18.5x
SWC 137 117 162 34.3x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 5 4 5 1.0x
ZTS 9 9 10 1.8x
Bun 9 8 9 1.8x
oxc (node) 76 59 99 15.2x
SWC 134 119 161 26.8x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 3 1.0x
Bun 6 6 7 2.0x
esbuild 10 7 14 3.3x
rolldown 121 105 152 40.3x
rspack 135 114 160 45.0x
webpack 398 364 453 132.7x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 4 3 5 1.0x
esbuild 8 8 9 2.0x
Bun 10 7 12 2.5x
rolldown 138 116 155 34.5x
rspack 149 130 170 37.3x
webpack 405 352 518 101.3x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 7 6 7 1.0x
Bun 13 9 24 1.9x
esbuild 14 12 16 2.0x
rolldown 164 144 177 23.4x

ubuntu-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 2 1 2 1.0x
esbuild 2 2 3 1.0x
Bun 2 2 3 1.0x
oxc (node) 30 29 32 15.0x
SWC 99 95 104 49.5x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 2 2 1.0x
ZTS 4 4 4 2.0x
Bun 4 4 4 2.0x
oxc (node) 31 30 32 15.5x
SWC 98 96 100 49.0x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
esbuild 2 2 2 1.0x
Bun 10 10 10 5.0x
ZTS 16 15 16 8.0x
oxc (node) 33 31 35 16.5x
SWC 118 116 119 59.0x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 2 2 2 1.0x
Bun 4 4 4 2.0x
esbuild 6 5 6 3.0x
rolldown 109 103 116 54.5x
rspack 113 111 115 56.5x
webpack 523 517 528 261.5x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 3 3 3 1.0x
Bun 5 5 5 1.7x
esbuild 7 7 8 2.3x
rolldown 112 106 115 37.3x
rspack 117 116 119 39.0x
webpack 524 514 535 174.7x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 8 8 8 1.0x
Bun 9 9 9 1.1x
esbuild 15 15 15 1.9x
rolldown 121 118 127 15.1x

windows-latest

transpile — small (100 lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 11 9 12 1.0x
Bun 18 17 18 1.6x
oxc (node) 62 62 63 5.6x

transpile — medium (1K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 12 11 12 1.0x
Bun 18 18 18 1.5x
oxc (node) 62 61 63 5.2x

transpile — large (5K lines)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
Bun 17 17 17 1.0x
ZTS 22 22 22 1.3x
oxc (node) 61 61 62 3.6x

bundle — small (10 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 14 13 18 1.0x
Bun 31 30 31 2.2x

bundle — medium (50 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 19 17 29 1.0x
Bun 36 34 43 1.9x

bundle — large (200 modules)

Tool Avg (ms) Min (ms) Max (ms) vs fastest
ZTS 32 31 36 1.0x
Bun 44 43 45 1.4x

Auto-generated by CI on 2026-04-02 01:15 UTC

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