Skip to content

WatchRebuildEvent

This content is not available in your language yet.

Defined in: core/index.ts:975

optional bytes?: number

Defined in: core/index.ts:990


optional changed?: string[]

Defined in: core/index.ts:978


optional error?: string

Defined in: core/index.ts:977


optional graphChanged?: boolean

Defined in: core/index.ts:979


optional phaseDurations?: object

Defined in: core/index.ts:1004

단계별 빌드 시간 (밀리초). 성공한 리빌드에서만 노출.

기본 phase (항상 측정):

  • detect / graph / link / shake / emit / delta / total 필드 이름과 실제 값이 정확히 일치. 2026-04-22 이전의 parse / semantic 은 사실 각각 graph / link+shake 를 담았던 레거시 이름이었으며 제거됨 — 이제 sub-phase 로만 (실제 parser / SemanticAnalyzer 시간) 노출된다.

Sub-phase (ZNTC_PROFILE=<cat> / BUNGAE_HMR_PROFILE=1 / profile: ["<cat>"] 활성 시):

  • scan / parse / resolve / semantic / transform / codegen / metadata
  • 비활성 상태에선 모두 0. parse 는 이제 진짜 parser 시간, semantic 은 진짜 SemanticAnalyzer.

codegen: number

Codegen 전체

delta: number

HMR delta 추출

detect: number

변경 감지 (mtime 스캔)

emit: number

코드 생성 (transform + codegen + emit)

emitConcat: number

Phase 3: module concat + runtime helpers 합산 + renderChunk + epilogue

emitCss: number

CSS 엔트리별 번들 + lightningcss 후처리

emitMetafile: number

--metafile / --analyze JSON 생성

emitModulePass: number

Phase 1/1.5/2/2.5 — used_names + cache lookup + emitModule + cache put

emitOutput: number

emitter.emitWithTreeShaking / emitChunks — 번들 출력 생성 본체

emitPolyfill: number

--polyfill 파일 내용 로딩 + Flow 트랜스파일

emitPrelude: number

포맷 prologue + polyfill IIFE + runtime helper 주입

emitRefresh: number

React Refresh 런타임 preamble/epilogue 조립 (dev + 브라우저)

emitSourcemapFinalize: number

소스맵 V3 JSON 생성 (VLQ encode + sources content + debugId)

graph: number

Module graph build — resolve + parse + semantic + finalize

graphBuild: number

graph.build() / graph.buildIncremental() — 모듈 그래프 구축 본체

graphDiscover: number

Phase 1: 이벤트 큐 BFS 스캔 (모듈 발견 + 파싱 + resolve)

graphFinalize: number

Phase 2-4: DFS exec_index + ExportsKind 승격 + TLA 전파

graphWorker: number

new Worker(new URL(...)) 패턴 entry 별도 빌드

link: number

Scope hoisting + linker

metadata: number

Linker metadata build

parse: number

Parser — 실제 parser 시간만

resolve: number

Dependency resolution

scan: number

Scanner tokenization

semantic: number

SemanticAnalyzer — 실제 semantic 분석 시간만

shake: number

Tree shaking

total: number

총 리빌드 시간 (detect → delta 합산)

transform: number

Transformer 전체


optional reparsedModules?: number

Defined in: core/index.ts:1075

증분 그래프에서 재파싱된 모듈 수. 캐시 미스된 모듈만 카운트. 전체 빌드에서는 미노출.


success: boolean

Defined in: core/index.ts:976


optional updates?: object[]

Defined in: core/index.ts:980

code: string

id: string

optional map?: string

모듈별 standalone source map (V3 JSON). sourcemap 옵션 활성화 시 채워진다. HMR 클라이언트가 eval된 코드에 sourceMappingURL data URL로 부착하면 전체 번들 sourcemap을 재생성하지 않고도 디버거 매핑이 유지된다 (Issue #1248).