Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

manualChunks cannot be used to produce a single JS file #285

@teemingc

Description

@teemingc

Describe the regression

Previously, in SvelteKit with Vite + Rollup, we would set manualChunks: () => 'bundle' and this would produce a single JS file after a build. This doesn't currently work with rolldown-vite.

Reproduction

https://stackblitz.com/~/github.com/eltigerchino/vitejs-vite-i4qk6uwn?file=README.md

Expected Behavior

Setting manualChunks and returning the same string every time should produce a single bundle.

Actual Behavior

Four JS files are produced.

Steps to Reproduce

Single JS file output Rollup vs Rolldown reproduction

Rollup

  1. Set manualChunks: () => 'bundle in vite.config.ts
  2. Run pnpm i then pnpm build (this time it's using Rollup)
  3. Observe that a single JS file has been produced.
  4. Set inlineDynamicImports: true in vite.config.ts then run pnpm build
  5. Observe that Rollup throws an error:
Invalid value for option "output.manualChunks" - this option is not supported for "output.inlineDynamicImports".
  1. Comment out the manualChunks setting in vite.config.ts then run pnpm build
  2. Observe that a single JS file has been produced.

Rolldown

  1. Add npm:rolldown-vite@latest to the package.json pnpm.overrides key.
  2. Set manualChunks: () => 'bundle in vite.config.ts
  3. Run pnpm i then pnpm build (this time it's using Rolldown)
  4. Observe that four JS files have been produced.
  5. Set inlineDynamicImports: true in vite.config.ts then run pnpm build
  6. Observe that three JS files have been produced and no error has been thrown.
  7. Comment out the manualChunks setting in vite.config.ts then run pnpm build
  8. Observe that one JS file has been produced.

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^7.0.0 => 7.0.0

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: upstreamBug in a dependency of Vite

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions