Skip to content

[Task]: stabilize chunkModulesOrder #9558

Description

@Boshen

Decide whether to enable experimental.chunkModulesOrder by default, stabilize it as opt-in, or remove it.

What the option does

Controls module rendering order within chunks: exec-order (default) or module-id. Order affects gzip ratios because adjacent module ordering changes how repeated patterns compress.

Why it matters — data from apps/10000

Single Vite build, JS + CSS gzipped at level 9, sourcemaps excluded. Only the Vite config changed between runs.

Vite config JS raw JS gzip Total gzip Δ vs default
default (exec-order) 5.20 MB 1.33 MB 1,394,102 B
chunkModulesOrder: 'module-id' 5.17 MB 818.30 KB 837,960 B −556,142 B (−39.9%)

Action items

  • Measure the benefit on more apps
  • Review API surface — naming, value set, how users should reason about the trade-off
  • Decide: default-on, opt-in stable, or remove

Part of: #9562

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