Skip to content

Tracking: chunking & chunking-caused issues #10008

Description

@hyfdev

Umbrella tracker for open issues caused or shaped by how Rolldown forms output chunks — cross-chunk execution order, inter-chunk cycles, cross-chunk init/binding wiring, chunk count/quality, chunk-graph parity vs Rollup, and the manual-chunking (advancedChunks / codeSplitting / preserveModules) surface. It spans rolldown/rolldown and the Rolldown-era vitejs/vite issues that surface these.

38 open (33 rolldown, 5 vite). Grouped by nature below; a priority-sorted view is in the collapsed section at the end. Last synced 2026-06-30.

correctness/execution-order (3)

Cross-chunk side-effects/modules emitted in the wrong run order; code runs before its dependency initialized.

  • rolldown#9998P2 A manual codeSplitting group unions modules from disjoint entry-reachability sets into one eagerly-executed chunk, so wi…
  • rolldown#9039P2 Certain export syntax breaks strictExecutionOrder under code splitting, producing a vendor chunk that runs before its de…
  • vitejs/vite#5142 — Dep-optimizer code-splitting emits a common side-effect dependency (e.g. polymer boot.js defining JSCompiler_renamePrope…

correctness/circular-import (1)

Splitting creates an inter-chunk cycle; a binding/runtime-helper is read in TDZ / before its chunk ran.

  • rolldown#7449P2 CJS + advancedChunks splitting forces a module into a separate chunk, creating a circular cross-chunk import where a con…

correctness/cross-chunk-init-binding (5)

A cross-chunk import/init binding is mis-wired, missing, or aliased wrong → value/helper undefined or wrong at runtime.

  • rolldown#9993P1 Regression: the __commonJSMin/__commonJS runtime helper is hoisted into the entry chunk and re-imported by code-split CJ…
  • rolldown#9887P2 advancedChunks + a CJS require + includeDependenciesRecursively:false places a cross-chunk import cycle so a wrapped-ESM…
  • vitejs/vite#21952P2 With advancedChunks splitting node_modules into a 'vendor' chunk, leaflet's global L binding is undefined at runtime (…
  • vitejs/vite#22756 — experimental.bundledDev: Rolldown's __reExport (export-* helper) is referenced in the served dev bundle but never emitte…
  • vitejs/vite#22583 — Vite 8 / Rolldown multi-entry Vue build emits calls to init_*_esm_bundler helpers that are never defined or imported acr…

correctness/other (4)

Chunking-caused correctness bugs outside the cross-chunk-init families (filenames, missing facade, getter clash).

  • rolldown#8761P2 With preserveModules and object-form entry, sanitizeFileName (and custom override) is ignored for emitted JS chunk filen…
  • rolldown#5449P2 With inlineDynamicImports:true, collapsing all dynamic imports into one chunk causes a runtime TypeError (Cannot set pro…
  • rolldown#9209P3 In unbundle/preserveModules mode the reachable subpath facade module (card/index.mjs) is not emitted, so the package's s…
  • vitejs/vite#22740P3 chunkImportMap with multiple entries: shared CSS chunk gets a .js import-map entry pointing at a non-existent file, so t…

quantity/too-many-chunks (4)

Rolldown emits more chunks than needed / than Rollup, inflating request count + size.

  • rolldown#4788P2 Rolldown does not merge side-effect-free shared chunks across multiple entries (as Rollup's experimentalMinChunkSize doe…
  • rolldown#4246P2 Small modules (e.g. literal-only) shared across entries are kept as separate chunks instead of being duplicated/inlined,…
  • rolldown#8116P3 Top-level-await entry plus a shared module is split into 4 chunks where Rollup produces only 3, so the splitting is sub-…
  • rolldown#7473 — Default code-splitting produces thousands of tiny chunks (575 on one app) and advancedChunks attempts either break bundl…

quality/facade-empty-redundant-chunk (7)

An extra facade / empty / redundant re-export chunk Rollup would merge away.

  • rolldown#9963P2 A common chunk that is executed by the entrypoint is no longer merged into the entrypoint, emitting 5 chunks where 4 are…
  • rolldown#6677P2 With advancedChunks, a pure re-export common chunk becomes empty yet is still emitted and imported because its re-export…
  • rolldown#9729P3 Manual grouping merges dynamic-import targets into a shared chunk but keeps one extra proxy/facade chunk per original ta…
  • rolldown#8935P3 Rolldown emits two extra re-export facade chunks (3 total) where Rollup produces 2, since a re-export-only entry is not …
  • rolldown#8501P3 With dts enabled, a plugin's virtual emitFile entry is treated as a second entry so runtime helpers get split into a red…
  • rolldown#7281P3 A shared-entry chunk redundantly re-imports the entry before its own export * from external, where the import line cou…
  • rolldown#3918P3 A side-effect-free dynamic import (await import('./hello')) still emits a real chunk, whereas Rollup inlines it as a f…

alignment/vs-rollup-graph (1)

Chunk-graph metadata/shape diverges from Rollup without a runtime break (parity / introspection).

  • rolldown#8100P3 Modules fully inlined into a chunk are omitted from chunk.moduleIds, diverging from how Rollup reports modules in a chun…

config-api/manual-chunking (3)

Gaps/bugs in advancedChunks / codeSplitting / preserveModules manual control.

  • rolldown#6083P2 With advancedChunks, a module shared by two manual chunks is merged into one of them (forcing chunk-to-chunk import) ins…
  • rolldown#9603P3 Request to expose the post-tree-shake (included) dependency graph to advancedChunks/codeSplitting group callbacks so man…
  • rolldown#7116P3 advancedChunks maxSize splits purely by file size, scattering related modules across chunks so many/all chunks get loade…

feature/enhancement (10)

Requested chunking capabilities, tracking tasks, and experimental-flag fate decisions.

  • rolldown#6427P3 Feature request: surface why module execution order changed in the output. The reorder is a direct consequence of chunk …
  • rolldown#4697P3 Request to apply preserveModules selectively (e.g. src but not node_modules) instead of all-or-nothing chunk emission.
  • rolldown#2654P3 Request to inline rolldown:runtime helpers into each chunk instead of sharing one runtime chunk, to stop runtime chang…
  • rolldown#9703 — Request a plugin hint to mark a module as inline-only so preserveModules folds it into importers instead of emitting a c…
  • rolldown#9559 — Tracking task to decide whether to stabilize, keep as a debug toggle, or remove experimental.chunkOptimization once chun…
  • rolldown#9558 — Tracking task to decide the fate of experimental.chunkModulesOrder, the in-chunk module rendering order that swung total…
  • rolldown#9557 — Tracking task to decide the path to stable for experimental.chunkImportMap, blocked on validating the Vite 8.1 beta inte…
  • rolldown#7309 — Documentation request for recommended advancedChunks recipes (vendor/shared presets) so users have a sane starting point…
  • rolldown#7114 — Tracking issue for next steps on manual code splitting (webpack-style splitChunks, rename maxSize, eliminate barrel chun…
  • rolldown#4437 — Tracking issue for controlling output chunking across default, preserveModules, and single-file (no-shared-chunk) modes,…
Sorted by priority

P1 (1)

  • rolldown#9993correctness/cross-chunk-init-binding · Regression: the __commonJSMin/__commonJS runtime helper is hoisted into the entry chunk an…

P2 (12)

  • rolldown#9998correctness/execution-order · A manual codeSplitting group unions modules from disjoint entry-reachability sets into one…
  • rolldown#9963quality/facade-empty-redundant-chunk · A common chunk that is executed by the entrypoint is no longer merged into the entrypoint,…
  • rolldown#9887correctness/cross-chunk-init-binding · advancedChunks + a CJS require + includeDependenciesRecursively:false places a cross-chunk…
  • rolldown#9039correctness/execution-order · Certain export syntax breaks strictExecutionOrder under code splitting, producing a vendor…
  • rolldown#8761correctness/other · With preserveModules and object-form entry, sanitizeFileName (and custom override) is igno…
  • rolldown#7449correctness/circular-import · CJS + advancedChunks splitting forces a module into a separate chunk, creating a circular …
  • rolldown#6677quality/facade-empty-redundant-chunk · With advancedChunks, a pure re-export common chunk becomes empty yet is still emitted and …
  • rolldown#6083config-api/manual-chunking · With advancedChunks, a module shared by two manual chunks is merged into one of them (forc…
  • rolldown#5449correctness/other · With inlineDynamicImports:true, collapsing all dynamic imports into one chunk causes a run…
  • rolldown#4788quantity/too-many-chunks · Rolldown does not merge side-effect-free shared chunks across multiple entries (as Rollup'…
  • rolldown#4246quantity/too-many-chunks · Small modules (e.g. literal-only) shared across entries are kept as separate chunks instea…
  • vitejs/vite#21952correctness/cross-chunk-init-binding · With advancedChunks splitting node_modules into a 'vendor' chunk, leaflet's global L bin…

P3 (14)

  • rolldown#9729quality/facade-empty-redundant-chunk · Manual grouping merges dynamic-import targets into a shared chunk but keeps one extra prox…
  • rolldown#9603config-api/manual-chunking · Request to expose the post-tree-shake (included) dependency graph to advancedChunks/codeSp…
  • rolldown#9209correctness/other · In unbundle/preserveModules mode the reachable subpath facade module (card/index.mjs) is n…
  • rolldown#8935quality/facade-empty-redundant-chunk · Rolldown emits two extra re-export facade chunks (3 total) where Rollup produces 2, since …
  • rolldown#8501quality/facade-empty-redundant-chunk · With dts enabled, a plugin's virtual emitFile entry is treated as a second entry so runtim…
  • rolldown#8116quantity/too-many-chunks · Top-level-await entry plus a shared module is split into 4 chunks where Rollup produces on…
  • rolldown#8100alignment/vs-rollup-graph · Modules fully inlined into a chunk are omitted from chunk.moduleIds, diverging from how Ro…
  • rolldown#7281quality/facade-empty-redundant-chunk · A shared-entry chunk redundantly re-imports the entry before its own export * from exter…
  • rolldown#7116config-api/manual-chunking · advancedChunks maxSize splits purely by file size, scattering related modules across chunk…
  • rolldown#6427feature/enhancement · Feature request: surface why module execution order changed in the output. The reorder is …
  • rolldown#4697feature/enhancement · Request to apply preserveModules selectively (e.g. src but not node_modules) instead of al…
  • rolldown#3918quality/facade-empty-redundant-chunk · A side-effect-free dynamic import (await import('./hello')) still emits a real chunk, wh…
  • rolldown#2654feature/enhancement · Request to inline rolldown:runtime helpers into each chunk instead of sharing one runtim…
  • vitejs/vite#22740correctness/other · chunkImportMap with multiple entries: shared CSS chunk gets a .js import-map entry pointin…

Feature / tracking (7)

  • rolldown#9703feature/enhancement · Request a plugin hint to mark a module as inline-only so preserveModules folds it into imp…
  • rolldown#9559feature/enhancement · Tracking task to decide whether to stabilize, keep as a debug toggle, or remove experiment…
  • rolldown#9558feature/enhancement · Tracking task to decide the fate of experimental.chunkModulesOrder, the in-chunk module re…
  • rolldown#9557feature/enhancement · Tracking task to decide the path to stable for experimental.chunkImportMap, blocked on val…
  • rolldown#7309feature/enhancement · Documentation request for recommended advancedChunks recipes (vendor/shared presets) so us…
  • rolldown#7114feature/enhancement · Tracking issue for next steps on manual code splitting (webpack-style splitChunks, rename …
  • rolldown#4437feature/enhancement · Tracking issue for controlling output chunking across default, preserveModules, and single…

Untriaged (4)

  • rolldown#7473quantity/too-many-chunks · Default code-splitting produces thousands of tiny chunks (575 on one app) and advancedChun…
  • vitejs/vite#22756correctness/cross-chunk-init-binding · experimental.bundledDev: Rolldown's __reExport (export-* helper) is referenced in the serv…
  • vitejs/vite#22583correctness/cross-chunk-init-binding · Vite 8 / Rolldown multi-entry Vue build emits calls to init_*_esm_bundler helpers that are…
  • vitejs/vite#5142correctness/execution-order · Dep-optimizer code-splitting emits a common side-effect dependency (e.g. polymer boot.js d…

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions