콘텐츠로 이동

WatchRebuildEvent

Defined in: core/index.ts:1394

optional bytes?: number

Defined in: core/index.ts:1417


optional changed?: string[]

Defined in: core/index.ts:1404


optional error?: string

Defined in: core/index.ts:1397

Single error tag from native @errorName(err) (catch path).


optional errors?: object[]

Defined in: core/index.ts:1403

#3799 — Multiple error diagnostics from bundler (success-but-errors path). When the bundler 자체가 throw 하지 않고 success-결과를 반환했지만 diagnostics 에 error severity 가 있는 경우 채워진다. error (single tag) 와 별개 — errors 가 있으면 우선 사용.

file: string

message: string


optional graphChanged?: boolean

Defined in: core/index.ts:1405


optional lazySeeds?: object[]

Defined in: core/index.ts:1532

D105 PR-C-1: lazy 빌드의 미파싱 seed 목록 { pathHash, path } (WatchReadyEvent.lazySeeds 와 동일 shape/공식). lazyCompilation 이 켜진 watch 세션에서 매 rebuild 마다 노출 → dev 서버가 rebuild 중 새로 추가/제거된 동적 import seed 집합을 갱신할 수 있다 (onReady 한정이던 PR-B-1 의 rebuild 확장). lazy 빌드가 아니거나 동적 import 가 없으면 생략(undefined).

path: string

pathHash: string


optional phaseDurations?: object

Defined in: core/index.ts:1434

Per-phase build time (milliseconds). Exposed only on a successful rebuild.

Base phases (always measured):

  • detect / graph / link / shake / emit / delta / total Field names exactly match their actual values. The pre-2026-04-22 parse / semantic were in fact legacy names that held graph / link+shake respectively and have been removed — they are now exposed only as sub-phases (the real parser / SemanticAnalyzer times).

Sub-phases (when ZNTC_PROFILE=<cat> / BUNGAE_HMR_PROFILE=1 / profile: ["<cat>"] is active):

  • scan / parse / resolve / semantic / transform / codegen / metadata
  • All 0 when inactive. parse is now the real parser time, semantic the real SemanticAnalyzer.

codegen: number

Codegen total.

delta: number

HMR delta extraction.

detect: number

Change detection (mtime scan).

emit: number

Code generation (transform + codegen + emit).

emitConcat: number

Phase 3: module concat + runtime helpers summation + renderChunk + epilogue.

emitCss: number

Per-CSS-entry bundling + lightningcss post-processing.

emitMetafile: number

--metafile / --analyze JSON generation.

emitModulePass: number

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

emitOutput: number

emitter.emitWithTreeShaking / emitChunks — the bundle output generation body.

emitPolyfill: number

Loading --polyfill file contents + Flow transpilation.

emitPrelude: number

Format prologue + polyfill IIFE + runtime helper injection.

emitRefresh: number

Assembling the React Refresh runtime preamble/epilogue (dev + browser).

emitSourcemapFinalize: number

Source map V3 JSON generation (VLQ encode + sources content + debugId).

graph: number

Module graph build — resolve + parse + semantic + finalize

graphBuild: number

graph.build() / graph.buildIncremental() — the module graph construction body.

graphDiscover: number

Phase 1: event queue BFS scan (module discovery + parsing + resolve).

graphFinalize: number

Phase 2-4: DFS exec_index + ExportsKind promotion + TLA propagation.

graphWorker: number

Separate build of the new Worker(new URL(...)) pattern entry.

link: number

Scope hoisting + linker

linkBuildExportMap: number

Link: per-module export map build.

linkComputeRenames: number

Link: canonical_name 계산. lodash 측정에서 ~50ms — RFC #3940 의 RenameTable 도입 (Phase 2) 후 baseline 으로 활용.

linkPopulateImportSymbols: number

Link: import symbol 채우기.

linkPopulateNamespaceAccesses: number

Link: namespace access 채우기 (namespace import 사용처).

linkPopulateReExportAliases: number

Link: re-export alias 채우기 (cross-module export name 매핑).

linkResolveImports: number

Link: import resolution (binding cross-reference).

metadata: number

Linker metadata build

parse: number

Parser — real parser time only.

resolve: number

Dependency resolution

scan: number

Scanner tokenization

semantic: number

SemanticAnalyzer — real semantic analysis time only.

shake: number

Tree shaking

total: number

Total rebuild time (sum of detect → delta).

transform: number

Transformer total.


optional reparsedModules?: number

Defined in: core/index.ts:1524

Number of modules reparsed in the incremental graph. Counts cache-missed modules only. Not exposed for full builds.


success: boolean

Defined in: core/index.ts:1395


optional updates?: object[]

Defined in: core/index.ts:1406

code: string

id: string

optional map?: string

Per-module standalone source map (V3 JSON). Populated when the sourcemap option is enabled. When the HMR client attaches it to the eval’d code as a sourceMappingURL data URL, debugger mapping is preserved without regenerating the whole bundle sourcemap (Issue #1248).