Fix Vite 8's build.rollupOptions Deprecation

A code comparison showing build.rollupOptions renamed to build.rolldownOptions in a Vite config, with the same manualChunks function unchanged
On this page

Why the key was renamed

Rolldown, not Rollup, is Vite 8’s production bundler. Vite’s migration guide lists the rename directly under “Deprecated Options”: build.rollupOptionsbuild.rolldownOptions, alongside the same rename for worker.rollupOptionsworker.rolldownOptions.

build.rollupOptions is one of the single most commonly customized Vite options. It’s where manualChunks, external, and custom output naming patterns live for most real projects. That popularity is exactly why this deprecation is loud: any project with a nontrivial build config sees the warning on every single build the moment it upgrades to Vite 8, even though nothing is actually broken yet.

Fix it: rename the key

Before: the deprecated key

vite.config.ts
export default defineConfig({
  build: {
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes("node_modules")) return "vendor";
        },
      },
    },
  },
});

After: the same config under the new key

vite.config.ts
export default defineConfig({
  build: {
    rolldownOptions: {
      output: {
        manualChunks(id) {
          if (id.includes("node_modules")) return "vendor";
        },
      },
    },
  },
});

Nothing inside the object changes. If your project also customizes worker.rollupOptions for a web worker build, rename that key the same way.

Check manualChunks while you're in there

If your manualChunks uses the older object-map shorthand instead of a function, the rename alone won’t fix your build. Rolldown only supports the function form. See Fix Vite 8 manualChunks Object Form Removed for that separate, sharper break.

Confirmed version range

Documented in Vite’s own current migration guide as an intentional Vite 8 rename, auto-mapped for backward compatibility today. This site’s own astro.config.mjs doesn’t customize build.rollupOptions at all, so this specific deprecation warning doesn’t fire on this repo’s own build. The rename still applies to any project that does customize it, which is common enough to be worth fixing proactively rather than waiting for a future major version to remove the old key outright. Browse more posts like this in the Guides & Fixes archive.

Frequently asked

Will build.rollupOptions stop working entirely at some point?

Not yet. It's deprecated and automatically mapped to build.rolldownOptions today, so existing configs keep building. Treat the warning as a heads-up to migrate on your own schedule, not an emergency, but don't assume the old key stays supported forever.

Does the rename change how any of the options behave?

No, only the key name changes. Whatever you had under build.rollupOptions (external, output, a manualChunks function) keeps the same shape under build.rolldownOptions. The one exception is the object form of manualChunks, which Rolldown never supported at all, regardless of which key it sits under.

Emitted as FAQPage JSON-LD from the same frontmatter — one source, no duplicated prose.

Recent posts

Full-text search via Pagefind · ↑↓ to navigate · ↵ to open