Skip to content

Commit aec2ef0

Browse files
authored
V8beta (vitejs#2278)
* feat!: the epic `rolldown-vite` merge (vitejs#2270) * feat!: the epic `rolldown-vite` merge * lock file * feat!: update default browser target (vitejs#2271) * docs: add `resolve.tsconfigPaths` option docs (vitejs#2272) * docs: add `emitDecoratorMetadata` description (vitejs#2273) * docs: `alwaysStrict` does not affect the build result anymore (vitejs#2274) * docs: vite 8 beta announcement (vitejs#2275) * docs: add overrides note in vite 8 beta post (vitejs#2276) * docs: update override instructions in release post (vitejs#2277)
1 parent eb1a701 commit aec2ef0

24 files changed

+920
-480
lines changed

.vitepress/config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,6 @@ export default defineConfig({
308308
text: 'パフォーマンス',
309309
link: '/guide/performance',
310310
},
311-
{
312-
text: 'Rolldown',
313-
link: '/guide/rolldown',
314-
},
315311
{
316312
text: `v${viteMajorVersion - 1} からの移行`,
317313
link: '/guide/migration',

blog/announcing-vite8-beta.md

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
---
2+
title: 'Vite 8 Beta: The Rolldown-powered Vite'
3+
author:
4+
name: The Vite Team
5+
date: 2025-12-03
6+
sidebar: false
7+
head:
8+
- - meta
9+
- property: og:type
10+
content: website
11+
- - meta
12+
- property: og:title
13+
content: Announcing Vite 8 Beta
14+
- - meta
15+
- property: og:image
16+
content: https://vite.dev/og-image-announcing-vite8-beta.webp
17+
- - meta
18+
- property: og:url
19+
content: https://vite.dev/blog/announcing-vite8-beta
20+
- - meta
21+
- property: og:description
22+
content: Vite 8 Beta Release Announcement
23+
- - meta
24+
- name: twitter:card
25+
content: summary_large_image
26+
---
27+
28+
# Vite 8 Beta: The Rolldown-powered Vite
29+
30+
_December 3, 2025_
31+
32+
![Vite 8 Beta Announcement Cover Image](/og-image-announcing-vite8-beta.webp)
33+
34+
TL;DR: The first beta of Vite 8, powered by [Rolldown](https://rolldown.rs/), is now available. Vite 8 ships significantly faster production builds and unlocks future improvement possibilities. You can try the new release by upgrading `vite` to version `8.0.0-beta.0` and reading the [migration guide](/guide/migration).
35+
36+
---
37+
38+
We're excited to release the first beta of Vite 8. This release unifies the underlying toolchain and brings better consistent behaviors, alongside significant build performance improvements. Vite now uses [Rolldown](https://rolldown.rs/) as its bundler, replacing the previous combination of esbuild and Rollup.
39+
40+
## A new bundler for the web
41+
42+
Vite previously relied on two bundlers to meet differing requirements for development and production builds:
43+
44+
1. esbuild for fast compilation during development
45+
2. Rollup for bundling, chunking, and optimizing production builds
46+
47+
This approach lets Vite focus on developer experience and orchestration instead of reinventing parsing and bundling. However, maintaining two separate bundling pipelines introduced inconsistencies: separate transformation pipelines, different plugin systems and a growing amount of glue code to keep bundling behavior aligned between development and production.
48+
49+
To solve this, [VoidZero team](https://voidzero.dev) has built **Rolldown**, the next-generation bundler with the goal to be used in Vite. It is designed for:
50+
51+
- **Performance**: Rolldown is written in Rust and operates at native speed. It matches esbuild’s performance level and is [**10–30× faster than Rollup**](https://github.com/rolldown/benchmarks).
52+
- **Compatibility**: Rolldown supports the same plugin API as Rollup and Vite. Most Vite plugins work out of the box with Vite 8.
53+
- **More Features**: Rolldown unlocks more advanced features for Vite, including full bundle mode, more flexible chunk split control, module-level persistent cache, Module Federation, and more.
54+
55+
## Unifying the toolchain
56+
57+
The impact of Vite’s bundler swap goes beyond performance. Bundlers leverage parsers, resolvers, transformers, and minifiers. Rolldown uses Oxc, another project led by VoidZero, for these purposes.
58+
59+
**That makes Vite the entry point to an end-to-end toolchain maintained by the same team: The build tool (Vite), the bundler (Rolldown) and the compiler (Oxc).**
60+
61+
This alignment ensures behavior consistency across the stack, and allows us to rapidly adopt and align with new language specifications as JavaScript continues to evolve. It also unlocks a wide range of improvements that previously couldn’t be done by Vite alone. For example, we can leverage Oxc’s semantic analysis to perform better tree-shaking in Rolldown.
62+
63+
## How Vite migrated to Rolldown
64+
65+
The migration to a Rolldown-powered Vite is a foundational change. Therefore, our team took deliberate steps to implement it without sacrificing stability or ecosystem compatibility.
66+
67+
First, a separate `rolldown-vite` package was [released as a technical preview](https://voidzero.dev/posts/announcing-rolldown-vite). This allowed us to work with early adopters without affecting the stable version of Vite. Early adopters benefited from Rolldown’s performance gains while providing valuable feedback. Highlights:
68+
69+
- Linear's production build times were reduced from 46s to 6s
70+
- Mercedes-Benz.io cut their build time down by up to 38%
71+
- Beehiiv reduced their build time by 64%
72+
73+
Next, we set up a test suite for validating key Vite plugins against `rolldown-vite`. This CI job helped us catch regressions and compatibility issues early, especially for frameworks and meta-frameworks such as SvelteKit, react-router and Storybook.
74+
75+
Lastly, we built a compatibility layer to help migrate developers from Rollup and esbuild options to the corresponding Rolldown options.
76+
77+
As a result, there is a smooth migration path to Vite 8 for everyone.
78+
79+
## Migrating to Vite 8 Beta
80+
81+
Since Vite 8 touches the core build behavior, we focused on keeping the configuration API and plugin hooks unchanged. We created a [migration guide](/guide/migration) to help you upgrade.
82+
83+
There are two available upgrade paths:
84+
85+
1. **Direct Upgrade:** Update `vite` in `package.json` and run the usual dev and build commands.
86+
2. **Gradual Migration:** Migrate from Vite 7 to the `rolldown-vite` package, and then to Vite 8. This allows you to identify incompatibilities or issues isolated to Rolldown without other changes to Vite. (Recommended for larger or complex projects)
87+
88+
> [!IMPORTANT]
89+
> If you are relying on specific Rollup or esbuild options, you might need to make some adjustments to your Vite config. Please refer to the [migration guide](/guide/migration) for detailed instructions and examples.
90+
> As with all non-stable, major releases, thorough testing is recommended after upgrading to ensure everything works as expected. Please make sure to report any [issues](https://github.com/vitejs/rolldown-vite/issues).
91+
92+
If you use a framework or tool that uses Vite as dependency, for example Astro, Nuxt, or Vitest, you have to override the `vite` dependency in your `package.json`, which works slightly different depending on your package manager:
93+
94+
:::code-group
95+
96+
```json [npm]
97+
{
98+
"overrides": {
99+
"vite": "8.0.0-beta.0"
100+
}
101+
}
102+
```
103+
104+
```json [Yarn]
105+
{
106+
"resolutions": {
107+
"vite": "8.0.0-beta.0"
108+
}
109+
}
110+
```
111+
112+
```json [pnpm]
113+
{
114+
"pnpm": {
115+
"overrides": {
116+
"vite": "8.0.0-beta.0"
117+
}
118+
}
119+
}
120+
```
121+
122+
```json [Bun]
123+
{
124+
"overrides": {
125+
"vite": "8.0.0-beta.0"
126+
}
127+
}
128+
```
129+
130+
:::
131+
132+
After adding these overrides, reinstall your dependencies and start your development server or build your project as usual.
133+
134+
## Additional Features in Vite 8
135+
136+
In addition to shipping with Rolldown, Vite 8 comes with:
137+
138+
- **Built-in tsconfig `paths` support:** Developers can enable it by setting [`resolve.tsconfigPaths`](/config/shared-options.md#resolve-tsconfigpaths) to `true`. This feature has a small performance cost and is not enabled by default.
139+
- **`emitDecoratorMetadata` support:** Vite 8 now has built-in automatic support for TypeScript's [`emitDecoratorMetadata` option](https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata). See the [Features](/guide/features.md#emitdecoratormetadata) page for more details.
140+
141+
## Looking Ahead
142+
143+
Speed has always been a defining feature for Vite. The integration with Rolldown and, by extension, Oxc means JavaScript developers benefit from Rust’s speed. Upgrading to Vite 8 should result in performance gains simply from using Rust.
144+
145+
We are also excited to ship Vite’s Full Bundle Mode soon, which drastically improves Vite’s dev server speed for large projects. Preliminary results show 3× faster dev server startup, 40% faster full reloads, and 10× fewer network requests.
146+
147+
Another defining Vite feature is the plugin ecosystem. We want JavaScript developers to continue extending and customizing Vite in JavaScript, the language they’re familiar with, while benefiting from Rust’s performance gains. Our team is collaborating with VoidZero team to accelerate JavaScript plugin usage in these Rust-based systems.
148+
149+
Upcoming optimizations that are currently experimental:
150+
151+
- [**Raw AST transfer**](https://github.com/oxc-project/oxc/issues/2409). Allow JavaScript plugins to access the Rust-produced AST with minimal overhead.
152+
- [**Native MagicString transforms**](https://rolldown.rs/in-depth/native-magic-string#native-magicstring). Simple custom transforms with logic in JavaScript but computation in Rust.
153+
154+
## **Connect with us**
155+
156+
If you've tried Vite 8 beta, then we'd love to hear your feedback! Please report any issues or share your experience:
157+
158+
- **Discord**: Join our [community server](https://chat.vite.dev/) for real-time discussions
159+
- **GitHub**: Share feedback on [GitHub discussions](https://github.com/vitejs/vite/discussions)
160+
- **Issues**: Report issues on the [rolldown-vite repository](https://github.com/vitejs/rolldown-vite/issues) for bugs and regressions
161+
- **Wins**: Share your improved build times in the [rolldown-vite-perf-wins repository](https://github.com/vitejs/rolldown-vite-perf-wins)
162+
163+
We appreciate all reports and reproduction cases. They help guide us towards the release of a stable 8.0.0.

config/build-options.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
- **デフォルト:** `'baseline-widely-available'`
99
- **関連:** [ブラウザーの互換性](/guide/build#browser-compatibility)
1010

11-
最終的なバンドルのブラウザー互換性のターゲット。デフォルトは Vite の特別な値 `'baseline-widely-available'` で、これは [Baseline](https://web-platform-dx.github.io/web-features/) Widely Available on 2025-05-01 に含まれるブラウザーを対象にします。具体的には `['chrome107', 'edge107', 'firefox104', 'safari16']` です。
11+
最終的なバンドルのブラウザー互換性のターゲット。デフォルトは Vite の特別な値 `'baseline-widely-available'` で、これは [Baseline](https://web-platform-dx.github.io/web-features/) Widely Available on 2026-01-01 に含まれるブラウザーを対象にします。具体的には `['chrome111', 'edge111', 'firefox114', 'safari16.4']` です。
1212

1313
もうひとつの特別な値は `'esnext'` で、これはネイディブの動的インポートをサポートしていることを前提としており、最小限のトランスパイルのみが実行されます。
1414

15-
変換は esbuild で実行され、この値は有効な [esbuild の target オプション](https://esbuild.github.io/api/#target)でなければいけません。カスタムターゲットは ES のバージョン(例: `es2015`)、バージョン付きのブラウザー(例: `chrome58`)、または複数のターゲットの文字列の配列を指定できます。
15+
変換は Oxc Transformer で実行され、この値は有効な [Oxc Transformer の target オプション](https://oxc.rs/docs/guide/usage/transformer/lowering#target)でなければいけません。カスタムターゲットは ES のバージョン(例: `es2015`)、バージョン付きのブラウザー(例: `chrome58`)、または複数のターゲットの文字列の配列を指定できます。
1616

17-
esbuild で安全にトランスパイルできない機能がコードに含まれていると、ビルドが失敗するので注意してください。詳細は [esbuild のドキュメント](https://esbuild.github.io/content-types/#javascript)を参照してください。
17+
Oxc で安全にトランスパイルできない機能がコードに含まれていると、ビルドは警告を出力するので注意してください。詳細は [Oxc のドキュメント](https://oxc.rs/docs/guide/usage/transformer/lowering#warnings)を参照してください。
1818

1919
## build.modulePreload
2020

@@ -129,10 +129,16 @@ CSS コード分割を有効/無効にします。有効にすると、非同期
129129

130130
## build.cssMinify
131131

132-
- **型:** `boolean | 'esbuild' | 'lightningcss'`
133-
- **デフォルト:** クライアントは [`build.minify`](#build-minify) と同じで、SSR は `'esbuild'`
132+
- **型:** `boolean | 'lightningcss' | 'esbuild'`
133+
- **デフォルト:** クライアントは [`build.minify`](#build-minify) と同じで、SSR は `'lightningcss'`
134134

135-
このオプションによって、デフォルトの `build.minify` を使うのではなく、CSS ミニファイを具体的に上書きすることで、JS と CSS のミニファイを別々に設定できるようになります。Vite はデフォルトでは `esbuild` を使用して CSS をミニファイしています。`'lightningcss'` を指定すると代わりに [Lightning CSS](https://lightningcss.dev/minification.html) を使用します。指定した場合は、 [`css.lightningcss`](./shared-options.md#css-lightningcss) を使用して設定ができます。
135+
このオプションによって、デフォルトの `build.minify` を使うのではなく、CSS ミニファイを具体的に上書きすることで、JS と CSS のミニファイを別々に設定できるようになります。Vite はデフォルトでは [Lightning CSS](https://lightningcss.dev/minification.html) を使用して CSS をミニファイしています。[`css.lightningcss`](./shared-options.md#css-lightningcss) を使用して設定ができます。`'esbuild'` を指定すると代わりに esbuild を使用します。
136+
137+
`'esbuild'` に設定する場合は esbuild のインストールが必要です。
138+
139+
```sh
140+
npm add -D esbuild
141+
```
136142

137143
## build.sourcemap
138144

@@ -141,17 +147,20 @@ CSS コード分割を有効/無効にします。有効にすると、非同期
141147

142148
本番用のソースマップを作成します。`true` の場合、ソースマップファイルは別に作られます。`inline` の場合、ソースマップは出力結果ファイルにデータ URI として追加されます。`hidden``true` と同様に動作しますが、バンドルファイル内のソースマップを指し示すコメントは記述されません。
143149

144-
## build.rollupOptions
150+
## build.rolldownOptions
145151

146-
- **型:** [`RollupOptions`](https://rollupjs.org/configuration-options/)
152+
- **型:** [`RolldownOptions`](https://rollupjs.org/configuration-options/)
147153

148-
基礎となる Rollup バンドルを直接カスタマイズします。これは、Rollup 設定ファイルからエクスポートされるオプションと同じで、Vite 内部の Rollup オプションにマージされます。詳細は [Rollup options docs](https://rollupjs.org/configuration-options/) を参照してください。
154+
<!-- TODO: update the link above and below to Rolldown's documentation -->
149155

150-
## build.commonjsOptions
156+
基礎となる Rolldown バンドルを直接カスタマイズします。これは、Rolldown 設定ファイルからエクスポートされるオプションと同じで、Vite 内部の Rolldown オプションにマージされます。詳細は [Rolldown options docs](https://rollupjs.org/configuration-options/) を参照してください。
151157

152-
- **型:** [`RollupCommonJSOptions`](https://github.com/rollup/plugins/tree/master/packages/commonjs#options)
158+
## build.rollupOptions
159+
160+
- **型:** `RolldownOptions`
161+
- **非推奨**
153162

154-
[@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs) に渡すオプションです
163+
このオプションは `build.rolldownOptions` オプションのエイリアスです。代わりに `build.rolldownOptions` オプションを使用してください
155164

156165
## build.dynamicImportVarsOptions
157166

@@ -160,6 +169,8 @@ CSS コード分割を有効/無効にします。有効にすると、非同期
160169

161170
[@rollup/plugin-dynamic-import-vars](https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars) に渡すオプションです。
162171

172+
<!-- TODO: we need to have a more detailed explanation here as we no longer use @rollup/plugin-dynamic-import-vars. we should say it's compatible with it though -->
173+
163174
## build.lib
164175

165176
- **型:** `{ entry: string | string[] | { [entryAlias: string]: string }, name?: string, formats?: ('es' | 'cjs' | 'umd' | 'iife')[], fileName?: string | ((format: ModuleFormat, entryName: string) => string), cssFileName?: string }`
@@ -256,16 +267,19 @@ SSR ビルドの間、静的アセットはクライアントビルドの一部
256267

257268
## build.minify
258269

259-
- **型:** `boolean | 'terser' | 'esbuild'`
260-
- **デフォルト:** クライアントビルドは `'esbuild'`、SSR ビルドでは `false`
270+
- **型:** `boolean | 'oxc' | 'terser' | 'esbuild'`
271+
- **デフォルト:** クライアントビルドは `'oxc'`、SSR ビルドでは `false`
261272

262-
ミニファイを無効にするには `false` を設定するか、使用するミニファイツールを指定します。デフォルトは [esbuild](https://github.com/evanw/esbuild) で、これは terser に比べて 20~40 倍速く、圧縮率は 1~2%だけ低下します。[ベンチマーク](https://github.com/privatenumber/minification-benchmarks)
273+
ミニファイを無効にするには `false` を設定するか、使用するミニファイツールを指定します。デフォルトは [Oxc Minifier](https://oxc.rs/docs/guide/usage/minifier) で、これは terser に比べて 30~90 倍速く、圧縮率は 0.5~2%だけ低下します。[ベンチマーク](https://github.com/privatenumber/minification-benchmarks)
274+
275+
`build.minify: 'esbuild'` は非推奨であり、将来削除される予定です。
263276

264277
pure アノテーションを取り除きツリーシェイクをできなくするため、ライブラリーモードで `'es'` フォーマットを使用する場合、`build.minify` オプションは空白文字をミニファイしないので注意してください。
265278

266-
`'terser'` を設定したときには、terser のインストールが必要です。
279+
`'esbuild'` または `'terser'` を設定したときには、それぞれ esbuild または Terser のインストールが必要です。
267280

268281
```sh
282+
npm add -D esbuild
269283
npm add -D terser
270284
```
271285

@@ -314,6 +328,8 @@ gzip 圧縮されたサイズレポートを有効/無効にします。大き
314328

315329
## build.watch
316330

331+
<!-- TODO: update the link below to Rolldown's documentation -->
332+
317333
- **型:** [`WatcherOptions`](https://rollupjs.org/configuration-options/#watch)`| null`
318334
- **デフォルト:** `null`
319335

0 commit comments

Comments
 (0)