Skip to content

Commit df3370e

Browse files
Merge remote-tracking branch 'origin/upstream-sync'
2 parents 9a11723 + fdfbfc1 commit df3370e

29 files changed

+320
-212
lines changed

docs/.vitepress/config.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ const additionalTitle = ((): string => {
4040
})()
4141
const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
4242
const oldVersions: DefaultTheme.NavItemWithLink[] = [
43+
{
44+
text: 'Vite 6 Docs',
45+
link: 'https://v6.vite.dev',
46+
},
4347
{
4448
text: 'Vite 5 Docs',
4549
link: 'https://v5.vite.dev'
@@ -63,7 +67,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
6367
case 'local':
6468
return [
6569
{
66-
text: 'Vite 6 Docs (release)',
70+
text: 'Vite 7 Docs (release)',
6771
link: 'https://vite.dev'
6872
},
6973
...oldVersions
@@ -319,7 +323,7 @@ export default defineConfig({
319323
link: '/guide/rolldown',
320324
},
321325
{
322-
text: 'مهاجرت از v5',
326+
text: 'مهاجرت از v6',
323327
link: '/guide/migration'
324328
},
325329
{
@@ -416,22 +420,22 @@ export default defineConfig({
416420
],
417421
'/changes/': [
418422
{
419-
text: 'Breaking Changes',
423+
text: 'تغییرات اساسی',
420424
link: '/changes/'
421425
},
422426
{
423-
text: 'Current',
427+
text: 'جاری',
424428
items: []
425429
},
426430
{
427-
text: 'Future',
431+
text: 'آینده',
428432
items: [
429433
{
430-
text: 'this.environment in Hooks',
434+
text: 'this.environment در هوک‌ها',
431435
link: '/changes/this-environment-in-hooks'
432436
},
433437
{
434-
text: 'HMR hotUpdate Plugin Hook',
438+
text: 'هوک پلاگین hotUpdate برای HMR',
435439
link: '/changes/hotupdate-hook'
436440
},
437441
{
@@ -449,7 +453,7 @@ export default defineConfig({
449453
]
450454
},
451455
{
452-
text: 'Past',
456+
text: 'گذشته',
453457
items: []
454458
}
455459
]
@@ -471,6 +475,8 @@ export default defineConfig({
471475
return pageData
472476
},
473477
markdown: {
478+
// languages used for twoslash and jsdocs in twoslash
479+
languages: ['ts', 'js', 'json'],
474480
codeTransformers: [transformerTwoslash()],
475481
config(md) {
476482
md.use(groupIconMdPlugin)

docs/.vitepress/theme/composables/sponsor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ const viteSponsors: Pick<Sponsors, 'special' | 'gold'> = {
3535
special: [
3636
// sponsors patak-dev
3737
{
38-
name: 'StackBlitz',
39-
url: 'https://stackblitz.com',
40-
img: '/stackblitz.svg',
38+
name: 'Bolt',
39+
url: 'https://bolt.new',
40+
img: '/bolt.svg',
4141
},
4242
// sponsors antfu
4343
{

docs/.vitepress/theme/styles/vars.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
}
9090

9191
.vp-sponsor-grid.big .vp-sponsor-grid-image {
92-
max-height: 96px;
92+
max-height: 56px;
9393
}
9494

9595
.vp-sponsor-grid.mini .vp-sponsor-grid-image[alt='Bit'] {

docs/blog/announcing-vite7.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: Vite 7.0 is out!
3+
author:
4+
name: The Vite Team
5+
date: 2025-06-24
6+
sidebar: false
7+
head:
8+
- - meta
9+
- property: og:type
10+
content: website
11+
- - meta
12+
- property: og:title
13+
content: Announcing Vite 7
14+
- - meta
15+
- property: og:image
16+
content: https://vite.dev/og-image-announcing-vite7.png
17+
- - meta
18+
- property: og:url
19+
content: https://vite.dev/blog/announcing-vite7
20+
- - meta
21+
- property: og:description
22+
content: Vite 7 Release Announcement
23+
- - meta
24+
- name: twitter:card
25+
content: summary_large_image
26+
---
27+
28+
# Vite 7.0 is out!
29+
30+
_June 24, 2025_
31+
32+
![Vite 7 Announcement Cover Image](/og-image-announcing-vite7.png)
33+
34+
We're happy to share the release of Vite 7! It has been 5 years since Evan You sent the first commit to the Vite repo, and nobody could have predicted how much the frontend ecosystem would change since then. Most modern frontend frameworks and tools are now working together, building on top of Vite's shared infrastructure. And they can innovate at a faster pace by sharing at a higher level. Vite is now being downloaded 31 million times a week, with a 14 million increase in the last seven months since the previous major release.
35+
36+
This year, we're making several big steps. To start with, [ViteConf](https://viteconf.org) is going to be in person! The Vite Ecosystem will gather in Amsterdam on October 9-10! Organized by [JSWorld](https://jsworldconference.com/) in partnership with [Bolt](https://bolt.new), [VoidZero](https://voidzero.dev), and the Vite Core Team! We had three incredible [ViteConf online editions](https://www.youtube.com/@viteconf/playlists), and we can't wait to meet in real life. Check out the speakers and get your ticket at the [ViteConf site](https://viteconf.org)!
37+
38+
And [VoidZero](https://voidzero.dev/posts/announcing-voidzero-inc) continues to make significant strides in its mission to build an open source unified development toolchain for the JavaScript ecosystem. Over the last year, the VoidZero team has been working on [Rolldown](https://rolldown.rs/), a Rust-based next-generation bundler, as part of a broader effort to modernize Vite's core. You can try out the Rolldown-powered Vite today by using the `rolldown-vite` package instead of the default `vite` package. It is a drop-in replacement, as Rolldown will become the default bundler for Vite in the future. Switching should reduce your build time, especially for larger projects. Read more at the [Rolldown-vite announcement blog post](https://voidzero.dev/posts/announcing-rolldown-vite) and our [migration guide](https://vite.dev/rolldown).
39+
40+
Through a partnership between VoidZero and [NuxtLabs](https://nuxtlabs.com/), Anthony Fu is working on creating Vite DevTools. They will offer deeper and more insightful debugging and analysis for all Vite-based projects and frameworks. You can read more on the [VoidZero and NuxtLabs join forces on Vite Devtools blog post](https://voidzero.dev/posts/voidzero-nuxtlabs-vite-devtools).
41+
42+
Quick links:
43+
44+
- [Docs](/)
45+
- New Translation: [فارسی](https://fa.vite.dev/)
46+
- Other Translations: [简体中文](https://cn.vite.dev/), [日本語](https://ja.vite.dev/), [Español](https://es.vite.dev/), [Português](https://pt.vite.dev/), [한국어](https://ko.vite.dev/), [Deutsch](https://de.vite.dev/)
47+
- [Migration Guide](/guide/migration)
48+
- [GitHub Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
49+
50+
Play online with Vite 7 using [vite.new](https://vite.new) or scaffold a Vite app locally with your preferred framework running `pnpm create vite`. Check out the [Getting Started Guide](/guide/) for more information.
51+
52+
We invite you to help us improve Vite (joining the more than [1.1K contributors to Vite Core](https://github.com/vitejs/vite/graphs/contributors)), our dependencies, or plugins and projects in the ecosystem. Learn more at our [Contributing Guide](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). A good way to get started is by [triaging issues](https://github.com/vitejs/vite/issues), [reviewing PRs](https://github.com/vitejs/vite/pulls), sending tests PRs based on open issues, and supporting others in [Discussions](https://github.com/vitejs/vite/discussions) or Vite Land's [help forum](https://discord.com/channels/804011606160703521/1019670660856942652). If you have questions, join our [Discord community](http://chat.vite.dev/) and talk to us in the [#contributing channel](https://discord.com/channels/804011606160703521/804439875226173480).
53+
54+
Stay updated and connect with others building on top of Vite by following us on [Bluesky](https://bsky.app/profile/vite.dev), [X](https://twitter.com/vite_js), or [Mastodon](https://webtoo.ls/@vite).
55+
56+
## Node.js Support
57+
58+
Vite now requires Node.js 20.19+, 22.12+. We have dropped Node.js 18, now that it has reached its [EOL](https://endoflife.date/nodejs) at the end of April 2025.
59+
60+
We require these new ranges so Node.js supports `require(esm)` without a flag. This allows us to distribute Vite 7.0 as ESM only without preventing the Vite JavaScript API from being required by CJS modules. Check out Anthony Fu's [Move on to ESM-only](https://antfu.me/posts/move-on-to-esm-only) for a detailed review of the current state of ESM in the ecosystem.
61+
62+
## Default Browser Target Changed to Baseline Widely Available
63+
64+
[Baseline](https://web-platform-dx.github.io/web-features/) gives us clear information about which web platform features work across their core browser set today. Baseline Widely Available indicates the feature is well-established and works across many devices and browser versions, being available across browsers for at least 30 months.
65+
66+
In Vite 7, the default browser target is changing from `'modules'` to a new default: `'baseline-widely-available'`. The set of browsers will be updated on each major to match the list of minimum browser versions compatible with Baseline Widely available features. The default browser value of `build.target` is changing in Vite 7.0:
67+
68+
- Chrome 87 → 107
69+
- Edge 88 → 107
70+
- Firefox 78 → 104
71+
- Safari 14.0 → 16.0
72+
73+
This change adds predictability to the default browser target for future releases.
74+
75+
## Vitest
76+
77+
For Vitest users, Vite 7.0 is supported from Vitest 3.2. You can read more about how the Vitest team keeps improving Vite testing story in the [Vitest 3.2 release blog post](https://vitest.dev/blog/vitest-3-2.html).
78+
79+
## Environment API
80+
81+
Vite 6 was the most significant major release since Vite 2, adding new capabilities with the [new experimental Environment API](https://vite.dev/blog/announcing-vite6.html#experimental-environment-api). We are keeping the new APIs as experimental while the ecosystem reviews how the new APIs fit on their projects and provide feedback. If you're building on top of Vite, we encourage you to test the new APIs and reach out to us in the [open Feedback discussion here](https://github.com/vitejs/vite/discussions/16358).
82+
83+
In Vite 7, we added a new `buildApp` hook to let plugins coordinate the building of environments. Read more in the [Environment API for Frameworks guide](/guide/api-environment-frameworks.html#environments-during-build).
84+
85+
We want to thank the teams that have been testing the new APIs and helping us stabilize the new features. The Cloudflare team, for example, announced the 1.0 release of their Cloudflare Vite plugin, as well as official support for React Router v7. Their plugin shows the potential of Environment API for runtime providers. Learn more about their approach and future steps at ["Just use Vite”… with the Workers runtime](https://blog.cloudflare.com/introducing-the-cloudflare-vite-plugin/).
86+
87+
## Migrating to Vite 7
88+
89+
Vite 7 should be a smooth update from Vite 6. We're removing already deprecated features, like Sass legacy API support and the `splitVendorChunkPlugin` that shouldn't affect your projects. We still suggest you review the [detailed Migration Guide](/guide/migration) before upgrading.
90+
91+
The complete list of changes is at the [Vite 7 Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md).
92+
93+
## Acknowledgments
94+
95+
Vite 7 was crafted by the [Vite Team](/team) with the help of the wide community of contributors, downstream maintainers, plugin authors. A special shout-out to [sapphi-red](https://github.com/sapphi-red) for his remarkable work on `rolldown-vite` and this release. Vite is brought to you by [VoidZero](https://voidzero.dev), in partnership with [Bolt](https://bolt.new/) and [Nuxt Labs](https://nuxtlabs.com/). We also want to thank our sponsors on [Vite's GitHub Sponsors](https://github.com/sponsors/vitejs) and [Vite's Open Collective](https://opencollective.com/vite).

docs/changes/hotupdate-hook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
دامنه تاثیر: `نویسندگان پلاگین Vite`
1010

1111
::: warning منسوخ‌شدن در آینده
12-
هوک `hotUpdate` اولین بار در نسخه `v6.0` معرفی شد. منسوخ شدن `handleHotUpdate` برای نسخه `v7.0` برنامه‌ریزی شده است. هنوز توصیه نمی‌کنیم که از `handleHotUpdate` استفاده نکنید. اگر می‌خواهید آزمایش کنید و بازخورد بدهید، می‌توانید در تنظیمات Vite خود `future.removePluginHookHandleHotUpdate` را به مقدار `"warn"` تنظیم کنید.
12+
هوک `hotUpdate` اولین بار در نسخه `v6.0` معرفی شد. منسوخ شدن `handleHotUpdate` برای یکی از نسخه‌های اصلی (major) آینده برنامه‌ریزی شده است. هنوز توصیه نمی‌کنیم که از `handleHotUpdate` استفاده نکنید. اگر می‌خواهید آزمایش کنید و بازخورد بدهید، می‌توانید در تنظیمات Vite خود `future.removePluginHookHandleHotUpdate` را به مقدار `"warn"` تنظیم کنید.
1313
:::
1414

1515
## انگیزه

docs/changes/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222

2323
## گذشته
2424

25-
تغییرات زیر اعمال شده یا لغو گردیده‌اند. این تغییرات در نسخه اصلی فعلی دیگر مرتبط نیستند.
25+
تغییرات زیر اعمال شده یا لغو گردیده‌اند. این تغییرات در نسخه اصلی فعلی دیگر معتبر یا قابل استفاده نیستند.
2626

2727
- _هنوز هیچ تغییر گذشته‌ای وجود ندارد_

docs/changes/per-environment-apis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
دامنه تأثیر: `نویسندگان افزونه‌های Vite`
1010

1111
::: warning منسوخ شدن در آینده
12-
نمونه `Environment` برای اولین بار در نسخه `v6.0` معرفی شد. منسوخ شدن `server.moduleGraph` و سایر متدهایی که اکنون در محیط‌ها قرار دارند، برای نسخه `v7.0` برنامه‌ریزی شده است. هنوز توصیه نمی‌کنیم از متدهای سرور فاصله بگیرید. برای شناسایی استفاده خود، این موارد را در تنظیمات Vite خود تنظیم کنید:
12+
نمونه `Environment` برای اولین بار در نسخه `v6.0` معرفی شد. منسوخ شدن `server.moduleGraph` و سایر متدهایی که اکنون در محیط‌ها قرار دارند، برای یکی از نسخه‌های اصلی (major) آینده برنامه‌ریزی شده است. هنوز توصیه نمی‌کنیم از متدهای سرور فاصله بگیرید. برای شناسایی استفاده خود، این موارد را در تنظیمات Vite خود تنظیم کنید:
1313

1414
```ts
1515
future: {
@@ -28,6 +28,6 @@ future: {
2828

2929
## راهنمای مهاجرت
3030

31-
- `server.moduleGraph` -> [`environment.moduleGraph`](/guide/api-environment#separate-module-graphs)
31+
- `server.moduleGraph` -> [`environment.moduleGraph`](/guide/api-environment-instances#separate-module-graphs)
3232
- `server.transformRequest(url, ssr)` -> `environment.transformRequest(url)`
3333
- `server.warmupRequest(url, ssr)` -> `environment.warmupRequest(url)`

docs/changes/shared-plugins-during-build.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
ویژگی `builder.sharedConfigBuild` برای اولین بار در نسخه `v6.0` معرفی شد. می‌توانید آن را روی `true` تنظیم کنید تا بررسی کنید افزونه‌هایتان با پیکربندی مشترک چگونه کار می‌کنند. ما به دنبال بازخورد هستیم تا پس از آمادگی اکوسیستم افزونه‌ها، این مقدار پیش‌فرض را در نسخه‌ای اصلی از Vite تغییر دهیم.
1313
:::
1414

15-
## انگیزه
1615
## انگیزه
1716

1817
هماهنگ کردن مسیر پلاگین‌ها در محیط توسعه و ساخت.
1918

20-
## راهنمای مهاجرت
2119
## راهنمای مهاجرت
2220

2321
برای اینکه بتوانید پلاگین‌ها را در محیط‌های مختلف به اشتراک بگذارید، وضعیت پلاگین باید بر اساس محیط جاری کلیدگذاری شود. پلاگینی به شکل زیر تعداد ماژول‌های تبدیل‌شده در همه محیط‌ها را محاسبه می‌کند.

docs/changes/this-environment-in-hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
دامنه تاثیر: `نویسندگان پلاگین Vite`
1010

1111
::: warning منسوخ‌شدن در آینده
12-
`this.environment` در نسخه `v6.0` معرفی‌شد. منسوخ شدن `options.ssr` برای نسخه `v7.0` برنامه‌ریزی شده است. در آن زمان، شروع به توصیه به مهاجرت پلاگین‌ها به استفاده از API جدید خواهیم کرد. برای شناسایی استفاده از این ویژگی، می‌توانید `future.removePluginHookSsrArgument` را در تنظیمات Vite خود به مقدار `"warn"` تنظیم کنید.
12+
`this.environment` در نسخه `v6.0` معرفی‌شد. منسوخ شدن `options.ssr` برای یکی از نسخه‌های اصلی (major) آینده برنامه‌ریزی شده است. در آن زمان، شروع به توصیه به مهاجرت پلاگین‌ها به استفاده از API جدید خواهیم کرد. برای شناسایی استفاده از این ویژگی، می‌توانید `future.removePluginHookSsrArgument` را در تنظیمات Vite خود به مقدار `"warn"` تنظیم کنید.
1313
:::
1414

1515
## انگیزه
@@ -40,4 +40,4 @@ export function myPlugin(): Plugin {
4040
}
4141
```
4242

43-
برای یک پیاده‌سازی پایدارتر در بلندمدت، هوک پلاگین باید به جای تکیه بر نام محیط، به‌طور دقیق برای [چندین محیط](/guide/api-environment.html#accessing-the-current-environment-in-hooks) از گزینه‌های محیطی ریزدانه استفاده کند.
43+
برای یک پیاده‌سازی پایدارتر در بلندمدت، هوک پلاگین باید به جای تکیه بر نام محیط، به‌طور دقیق برای [چندین محیط](/guide/api-environment-plugins.html#accessing-the-current-environment-in-hooks) از گزینه‌های محیطی ریزدانه استفاده کند.

docs/config/server-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default defineConfig({
254254

255255
گزینه‌های ناظر سیستم فایل که به [chokidar](https://github.com/paulmillr/chokidar/tree/3.6.0#api) ارسال می‌شن.
256256

257-
ناظر سرور `root` رو تماشا می‌کنه و به‌صورت پیش‌فرض دایرکتوری‌های `git` ، `node_modules` و دایرکتوری‌های `cacheDir` و `build.outDir` Vite رو نادیده می‌گیره. وقتی یه فایل تماشا‌ شده تغییر می‌کنه، Vite HMR رو اعمال می‌کنه و صفحه رو فقط اگه نیاز باشه به‌روز می‌کنه.
257+
ناظر سرور `root` رو تماشا می‌کنه و به‌صورت پیش‌فرض دایرکتوری‌های `test-results/` ، `node_modules` ، `git` و دایرکتوری‌های `cacheDir` و `build.outDir` Vite رو نادیده می‌گیره. وقتی یه فایل تماشا‌ شده تغییر می‌کنه، Vite HMR رو اعمال می‌کنه و صفحه رو فقط اگه نیاز باشه به‌روز می‌کنه.
258258

259259
اگه روی `null` تنظیم بشه، هیچ فایلی تماشا نمی‌شه. `server.watcher` یه منتشرکننده رویداد سازگار می‌ده، ولی فراخوانی `add` یا `unwatch` اثری نداره.
260260

0 commit comments

Comments
 (0)