2026-06-01
요약 (AI 작성)
전날 시작한 lazy dev 모듈 HMR 작업이 결실을 맺었습니다. dev+split lazy 모듈을 전역 per-module __zntc_modules 레지스트리에 등록해 cross-chunk hot-replace를 가능하게 하고(RFC_LAZY_DEV_MODULE_HMR PR-2, #4038 재해결), 그 위에서 web 네이티브 React Fast Refresh를 구현해 컴포넌트를 편집해도 리로드 없이 state가 보존되도록 했습니다.
나머지는 dev_split의 cross-chunk 결함을 집중적으로 잡는 작업이었습니다. re-export-from-CJS·export*·side-effect를 글로벌 레지스트리로 해석하도록 바꾸고, user-entry 청크가 cross-chunk const export를 init 전에 snapshot하던 버그(follow-up A, #4098), 예약어 default export destructuring이 SyntaxError를 내던 문제를 canonical 모듈 기반 바인딩 해석으로 수정(#4096), 동적 청크가 entry 모듈 export를 노출하지 않아 lazy 라우트 렌더가 깨지던 #4079 회귀를 복구했습니다. 또한 cross-chunk에서 같은 이름이 충돌하는 문제를 전역 일관 네이밍 인프라로 풀어내는 작업(#4101 Inc-1~3)과 이를 지키는 방어 테스트 스위트를 함께 추가했습니다.
커밋
ohah/zntc
- fix(bundler): dev_split 의 re-export-from-CJS/export*/side-effect 를 글로벌 레지스트리로 해석
- fix(bundler): dev_split user-entry 청크가 cross-chunk const export 를 init 전 snapshot 하던 버그 (follow-up A)
- fix(bundler): cross-chunk 예약어 export(default) destructuring SyntaxError — canonical 모듈 기반 바인딩 해석
- test(bundler): cross-chunk 예약어 default 바인딩 해석 회귀 lock (#4096 후속)
- fix(bundler): dev_split 동적 청크가 entry 모듈 export 를 노출 — lazy 라우트 렌더 복구 (#4079 회귀)
- fix(dev-server): Zig DevServer serveReactRefresh 가 __ReactRefresh 글로벌 + dev cjs 본문 서빙
- fix(bundler): dev_split 동적 청크가 re-export forwarding(export {x} from)을 네임스페이스 getter로 노출
- fix(bundler): dev wrap-all 에서 겹치는 helper import(jsx-runtime)의 hoisted 선언을 canonical 명으로
- fix(bundler): dev_split lazy 청크의 import/require() 크로스청크 공유 CJS 를 글로벌 레지스트리로 해석
- feat(bundler): dev+split lazy 모듈을 글로벌 per-module __zntc_modules 에 등록 — cross-chunk hot-replace (RFC_LAZY_DEV_MODULE_HMR PR-2, #4038 재해결)
- feat(dev): web 네이티브 React Fast Refresh — 컴포넌트 편집 시 리로드 없이 state 보존 (RFC_LAZY_DEV_MODULE_HMR §5)