Skip to content

manualChunks is not supported when using rolldown-vite – throws validation error #119

@sangquangnguyen

Description

@sangquangnguyen

Describe the bug

Hi, I’m using rolldown-vite as the bundler in my Vite project, and attempting to configure manualChunks in the rollupOptions.output results in a build failure. Seems like manualChunks is not supported yet by rolldown and will be used by advancedChunks

Reproduction

https://github.com/sangquangnguyen/rolldown-vite-manualChunks-bug

Steps to reproduce

  1. Set up a Vite project using rolldown-vite.
  2. Add the following to your vite.config.js or vite.config.ts:
export default {
  build: {
    rollupOptions: {
      output: {
        manualChunks: {
          vendor: ['react', 'react-dom']
        }
      }
    }
  }
}
  1. Run vite build.

System Info

System:
    OS: macOS 15.3.2
    CPU: (10) x64 Apple M2 Pro
    Memory: 205.27 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    Yarn: 4.5.0 - ~/.nvm/versions/node/v20.17.0/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
    bun: 1.1.20 - /usr/local/bin/bun
    Watchman: 2024.12.02.00 - /usr/local/bin/watchman
  Browsers:
    Safari: 18.3.1
  npmPackages:
    rolldown-vite:  6.3.0-beta.8

Used Package Manager

yarn

Logs

✗ Build failed in 390ms
error during build:
Failed validate output options.
- For the "manualChunks". Invalid key: Expected never but received "manualChunks".

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions