Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vitepress/buildEnd.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const buildEnd = async (config: SiteConfig): Promise<void> => {
id: blogUrl,
link: blogUrl,
language: 'en',
image: 'https://vite.dev/og-image.png',
image: 'https://vite.dev/og-image.jpg',
favicon: 'https://vite.dev/logo.svg',
copyright: 'Copyright © 2019-present VoidZero Inc. & Vite Contributors',
})
Expand Down
7 changes: 6 additions & 1 deletion .vitepress/theme/components/AsideSponsors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ const sponsors = computed(() => {
href="https://viteconf.org/?utm=vite-sidebar"
target="_blank"
>
<img width="22" height="22" src="/viteconf.svg" alt="ViteConf Logo" />
<img
width="22"
height="22"
src="../../../images/viteconf.svg"
alt="ViteConf Logo"
/>
<span>
<p class="extra-info">Building Together</p>
<p class="heading">ViteConf 2025</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ onMounted(() => {
</div>
<div class="vite-chip__filter" />
<img
:src="isUwu ? '/logo-uwu.png' : '/logo.svg'"
:src="isUwu ? '/logo-uwu.webp' : '/logo.svg'"
:alt="isUwu ? 'Vite Kawaii Logo by @icarusgkx' : 'Vite Logo'"
class="vite-chip__logo"
:class="{ uwu: isUwu }"
Expand Down Expand Up @@ -715,7 +715,7 @@ onMounted(() => {
}

background:
url('/noise.png'),
url('../common/noise.webp'),
radial-gradient(
circle at right center,
rgb(86, 50, 119) 0%,
Expand All @@ -732,7 +732,7 @@ onMounted(() => {

@media (min-width: 1024px) {
background:
url('/noise.png'),
url('../common/noise.webp'),
radial-gradient(
circle at right center,
rgba(75, 41, 105, 0.5) 0%,
Expand All @@ -751,7 +751,7 @@ onMounted(() => {

@media (min-width: 1500px) {
background:
url('/noise.png'),
url('../common/noise.webp'),
radial-gradient(
circle at right center,
rgba(75, 41, 105, 0.5) 0%,
Expand All @@ -770,7 +770,7 @@ onMounted(() => {

@media (min-width: 1800px) {
background:
url('/noise.png'),
url('../common/noise.webp'),
radial-gradient(
circle at right center,
rgba(75, 41, 105, 0.5) 0%,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ import HeroDiagram from './HeroDiagram.vue'
class="hero__pill"
target="_blank"
>
<img src="/viteconf.svg" alt="Viteconf logo" width="20" height="20" />
<img
src="../../../../../images/viteconf.svg"
alt="Viteconf logo"
width="20"
height="20"
/>
<span>ViteConf 2025</span>
</a>

Expand All @@ -30,7 +35,7 @@ import HeroDiagram from './HeroDiagram.vue'
target="_blank"
class="btn btn--outline"
>
<img src="/github.svg" alt="GitHub logo" width="20" height="20" />
<img src="./github.svg" alt="GitHub logo" width="20" height="20" />
GitHub
</a>
</div>
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ onUnmounted(() => {
height: 100%;
border-radius: 12px 0 0 12px;
background:
url('/noise.png'),
url('../common/noise.webp'),
radial-gradient(
ellipse 140% 80% at 96% bottom,
#13b351 0%,
Expand Down Expand Up @@ -381,7 +381,7 @@ onUnmounted(() => {
right: 40px;
width: 1px;
height: calc(100% - 170px - 33px);
background: url('/noise.png'), #13b351;
background: url('../common/noise.webp'), #13b351;
box-shadow: 0 0 10px 0 #13b351;
transition: all 0.5s ease-in;
will-change: transform, opacity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const { data } = useSponsor()
<!-- Title Section -->
<img
class="icon-heart"
src="/heart.svg"
src="./heart.svg"
alt="Vite is made possible by our contributors, partner companies, and sponsors"
width="58"
height="55"
Expand Down
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
9 changes: 6 additions & 3 deletions .vitepress/theme/composables/sponsor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { onMounted, onUnmounted, ref } from 'vue'
import voidZeroSvg from './images/voidzero.svg'
import boltSvg from './images/bolt.svg'
import nuxtLabsSvg from './images/nuxtlabs.svg'

interface Sponsors {
special: Sponsor[]
Expand Down Expand Up @@ -28,7 +31,7 @@ const dataUrl = `${dataHost}/vite.json`
export const voidZero = {
name: 'VoidZero',
url: 'https://voidzero.dev',
img: '/voidzero.svg',
img: voidZeroSvg,
} satisfies Sponsor

const viteSponsors: Pick<Sponsors, 'special' | 'gold'> = {
Expand All @@ -37,13 +40,13 @@ const viteSponsors: Pick<Sponsors, 'special' | 'gold'> = {
{
name: 'Bolt',
url: 'https://bolt.new',
img: '/bolt.svg',
img: boltSvg,
},
// sponsors antfu
{
name: 'NuxtLabs',
url: 'https://nuxtlabs.com',
img: '/nuxtlabs.svg',
img: nuxtLabsSvg,
},
],
gold: [
Expand Down
10 changes: 5 additions & 5 deletions blog/announcing-vite3.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 3
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite3.png
content: https://vite.dev/og-image-announcing-vite3.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite3
Expand All @@ -31,7 +31,7 @@ _July 23, 2022_ - Check out the [Vite 4.0 announcement](./announcing-vite4.md)

In February last year, [Evan You](https://twitter.com/youyuxi) released Vite 2. Since then, its adoption has grown non-stop, reaching more than 1 million npm downloads per week. A sprawling ecosystem rapidly formed after the release. Vite is powering a renewed innovation race in Web frameworks. [Nuxt 3](https://v3.nuxtjs.org/) uses Vite by default. [SvelteKit](https://kit.svelte.dev/), [Astro](https://astro.build/), [Hydrogen](https://hydrogen.shopify.dev/), and [SolidStart](https://docs.solidjs.com/quick-start) are all built with Vite. [Laravel has now decided to use Vite by default](https://laravel.com/docs/9.x/vite). [Vite Ruby](https://vite-ruby.netlify.app/) shows how Vite can improve Rails DX. [Vitest](https://vitest.dev) is making strides as a Vite-native alternative to Jest. Vite is behind [Cypress](https://docs.cypress.io/guides/component-testing/writing-your-first-component-test) and [Playwright](https://playwright.dev/docs/test-components)'s new Component Testing features, Storybook has [Vite as an official builder](https://github.com/storybookjs/builder-vite). And [the list goes on](https://patak.dev/vite/ecosystem.html). Maintainers from most of these projects got involved in improving the Vite core itself, working closely with the Vite [team](https://vite.dev/team) and other contributors.

![Vite 3 Announcement Cover Image](/og-image-announcing-vite3.png)
![Vite 3 Announcement Cover Image](/og-image-announcing-vite3.webp)

Today, 16 months from the v2 launch we are happy to announce the release of Vite 3. We decided to release a new Vite major at least every year to align with [Node.js's EOL](https://nodejs.org/en/about/releases/), and take the opportunity to review Vite's API regularly with a short migration path for projects in the ecosystem.

Expand All @@ -47,7 +47,7 @@ If you are new to Vite, we recommend reading the [Why Vite Guide](https://vite.d

Go to [vite.dev](https://vite.dev) to enjoy the new v3 docs. Vite is now using the new [VitePress](https://vitepress.vuejs.org) default theme, with a stunning dark mode between other features.

[![Vite documentation frontpage](../images/v3-docs.png)](https://vite.dev)
[![Vite documentation frontpage](../images/v3-docs.webp)](https://vite.dev)

Several projects in the ecosystem have already migrated to it (see [Vitest](https://vitest.dev), [vite-plugin-pwa](https://vite-plugin-pwa.netlify.app/), and [VitePress](https://vitepress.vuejs.org/) itself).

Expand Down Expand Up @@ -223,9 +223,9 @@ In part, this reduction was possible by making some dependencies that most users

A triaging marathon was spearheaded by [@bluwyoo](https://twitter.com/bluwyoo), [@sapphi_red](https://twitter.com/sapphi_red), that recently joined the Vite team. During the past three months, the Vite open issues were reduced from 770 to 400. And this dive was achieved while the newly open PRs were at an all-time high. At the same time, [@haoqunjiang](https://twitter.com/haoqunjiang) had also curated a comprehensive [overview of Vite issues](https://github.com/vitejs/vite/discussions/8232).

[![Graph of open issues and pull requests in Vite](../images/v3-open-issues-and-PRs.png)](https://www.repotrends.com/vitejs/vite)
[![Graph of open issues and pull requests in Vite](../images/v3-open-issues-and-PRs.webp)](https://www.repotrends.com/vitejs/vite)

[![Graph of new issues and pull requests in Vite](../images/v3-new-open-issues-and-PRs.png)](https://www.repotrends.com/vitejs/vite)
[![Graph of new issues and pull requests in Vite](../images/v3-new-open-issues-and-PRs.webp)](https://www.repotrends.com/vitejs/vite)

## Compatibility Notes

Expand Down
8 changes: 4 additions & 4 deletions blog/announcing-vite4-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 4.3
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite4-3.png
content: https://vite.dev/og-image-announcing-vite4-3.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite4-3
Expand All @@ -29,7 +29,7 @@ head:

_April 20, 2023_

![Vite 4.3 Announcement Cover Image](/og-image-announcing-vite4-3.png)
![Vite 4.3 Announcement Cover Image](/og-image-announcing-vite4-3.webp)

Quick links:

Expand Down Expand Up @@ -60,9 +60,9 @@ These are the performance improvements as measured by [sapphi-red/performance-co
| **Root HMR** | 30.5ms | 24.0ms | -21.3% |
| **Leaf HMR** | 16.9ms | 10.0ms | -40.8% |

![Vite 4.3 vs 4.2 startup time comparison](/vite4-3-startup-time.png)
![Vite 4.3 vs 4.2 startup time comparison](../images/vite4-3-startup-time.webp)

![Vite 4.3 vs 4.2 HMR time comparison](/vite4-3-hmr-time.png)
![Vite 4.3 vs 4.2 HMR time comparison](../images/vite4-3-hmr-time.webp)

You can read more information about the benchmark [here](https://gist.github.com/sapphi-red/25be97327ee64a3c1dce793444afdf6e). Specs and Versions for this performance run:

Expand Down
6 changes: 3 additions & 3 deletions blog/announcing-vite4.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 4
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite4.png
content: https://vite.dev/og-image-announcing-vite4.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite4
Expand All @@ -31,13 +31,13 @@ _December 9, 2022_ - Check out the [Vite 5.0 announcement](./announcing-vite5.md

Vite 3 [was released](./announcing-vite3.md) five months ago. npm downloads per week have gone from 1 million to 2.5 million since then. The ecosystem has matured too, and continues to grow. In this year's [Jamstack Conf survey](https://twitter.com/vite_js/status/1589665610119585793), usage among the community jumped from 14% to 32% while keeping a high 9.7 satisfaction score. We saw the stable releases of [Astro 1.0](https://astro.build/), [Nuxt 3](https://v3.nuxtjs.org/), and other Vite-powered frameworks that are innovating and collaborating: [SvelteKit](https://kit.svelte.dev/), [Solid Start](https://www.solidjs.com/blog/introducing-solidstart), [Qwik City](https://qwik.builder.io/qwikcity/overview/). Storybook announced first-class support for Vite as one of its main features for [Storybook 7.0](https://storybook.js.org/blog/first-class-vite-support-in-storybook/). Deno now [supports Vite](https://www.youtube.com/watch?v=Zjojo9wdvmY). [Vitest](https://vitest.dev) adoption is exploding, it will soon represent half of Vite's npm downloads. Nx is also investing in the ecosystem, and [officially supports Vite](https://nx.dev/packages/vite).

[![Vite 4 Ecosystem](/ecosystem-vite4.png)](https://viteconf.org/2022/replay)
[![Vite 4 Ecosystem](../images/ecosystem-vite4.webp)](https://viteconf.org/2022/replay)

As a showcase of the growth Vite and related projects have experienced, the Vite ecosystem gathered on October 11th at [ViteConf 2022](https://viteconf.org/2022/replay). We saw representatives from the main web framework and tools tell stories of innovation and collaboration. And in a symbolic move, the Rollup team choose that exact day to release [Rollup 3](https://cn.rollupjs.org).

Today, the Vite [team](https://vite.dev/team) with the help of our ecosystem partners, is happy to announce the release of Vite 4, powered during build time by Rollup 3. We've worked with the ecosystem to ensure a smooth upgrade path for this new major. Vite is now using [Rollup 3](https://github.com/vitejs/vite/issues/9870), which allowed us to simplify Vite's internal asset handling and has many improvements. See the [Rollup 3 release notes here](https://github.com/rollup/rollup/releases/tag/v3.0.0).

![Vite 4 Announcement Cover Image](/og-image-announcing-vite4.png)
![Vite 4 Announcement Cover Image](/og-image-announcing-vite4.webp)

Quick links:

Expand Down
6 changes: 3 additions & 3 deletions blog/announcing-vite5-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 5.1
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite5-1.png
content: https://vite.dev/og-image-announcing-vite5-1.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite5-1
Expand All @@ -29,7 +29,7 @@ head:

_February 8, 2024_

![Vite 5.1 Announcement Cover Image](/og-image-announcing-vite5-1.png)
![Vite 5.1 Announcement Cover Image](/og-image-announcing-vite5-1.webp)

Vite 5 [was released](./announcing-vite5.md) last November, and it represented another big leap for Vite and the ecosystem. A few weeks ago we celebrated 10 million weekly npm downloads and 900 contributors to the Vite repo. Today, we're excited to announce the release of Vite 5.1.

Expand Down Expand Up @@ -86,7 +86,7 @@ The preview server now exposes a `close` method, which will properly teardown th

Vite keeps getting faster with each release, and Vite 5.1 is packed with performance improvements. We measured the loading time for 10K modules (25 level deep tree) using [vite-dev-server-perf](https://github.com/yyx990803/vite-dev-server-perf) for all minor versions from Vite 4.0. This is a good benchmark to measure the effect of Vite's bundle-less approach. Each module is a small TypeScript file with a counter and imports to other files in the tree, so this mostly measuring the time it takes to do the requests a separate modules. In Vite 4.0, loading 10K modules took 8 seconds on a M1 MAX. We had a breakthrough in [Vite 4.3 were we focused on performance](./announcing-vite4-3.md), and we were able to load them in 6.35 seconds. In Vite 5.1, we managed to do another performance leap. Vite is now serving the 10K modules in 5.35 seconds.

![Vite 10K Modules Loading time progression](/vite5-1-10K-modules-loading-time.png)
![Vite 10K Modules Loading time progression](../images/vite5-1-10K-modules-loading-time.webp)

The results of this benchmark run on Headless Puppeteer and are a good way to compare versions. They don't represent the time as experienced by users though. When running the same 10K modules in an Incognito window is Chrome, we have:

Expand Down
4 changes: 2 additions & 2 deletions blog/announcing-vite5.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 5
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite5.png
content: https://vite.dev/og-image-announcing-vite5.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite5
Expand All @@ -29,7 +29,7 @@ head:

_2023年11月16日_

![Vite 5公告封面图片](/og-image-announcing-vite5.png)
![Vite 5公告封面图片](/og-image-announcing-vite5.webp)

Vite 4 发布了将近一年,它为生态系统奠定了坚实的基础。每周的 npm 下载量从250万增加到了750万,因为项目不断在共享基础设施上构建。各种框架不断创新,除了 [Astro](https://astro.build/)、[Nuxt](https://nuxt.com/)、[SvelteKit](https://kit.svelte.dev/)、[Solid Start](https://www.solidjs.com/blog/introducing-solidstart)、[Qwik City](https://qwik.builder.io/qwikcity/overview/) 等等之外,我们看到新的框架加入并使生态系统变得更加强大。[RedwoodJS](https://redwoodjs.com/) 和 [Remix](https://remix.run/) 转向 Vite 为 React 生态系统的进一步采用铺平了道路。[Vitest](https://vitest.dev) 的增长速度甚至比 Vite 还要快。其团队一直在努力工作,并将很快 [发布 Vitest 1.0](https://github.com/vitest-dev/vitest/issues/3596)。当与其他工具一起使用时,如 [Storybook](https://storybook.js.org)、[Nx](https://nx.dev) 和 [Playwright](https://playwright.dev),Vite 的故事不断改善,环境也是如此,Vite 的开发在 [Deno](https://deno.com) 和 [Bun](https://bun.sh) 中都可以工作。

Expand Down
6 changes: 3 additions & 3 deletions blog/announcing-vite6.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 6
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite6.png
content: https://vite.dev/og-image-announcing-vite6.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite6
Expand All @@ -29,7 +29,7 @@ head:

_2024年11月26日_

![Vite 6 Announcement Cover Image](/og-image-announcing-vite6.png)
![Vite 6 Announcement Cover Image](/og-image-announcing-vite6.webp)

今天,Vite 迎来了发展历程中的重要里程碑。我们很高兴地宣布,Vite 6 正式发布了!这一重大版本的发布离不开 Vite [团队](/team)、[贡献者](https://github.com/vitejs/vite/graphs/contributors) 以及整个生态系统合作伙伴的共同努力。

Expand All @@ -39,7 +39,7 @@ Vite 生态系统也迎来了一批新成员,包括 [TanStack Start](https://t

Vite 已被 OpenAI、Google、Apple、Microsoft、NASA、Shopify、Cloudflare、GitLab、Reddit 和 Linear 等众多知名公司采用。两个月前,我们创建了一份 [使用 Vite 的公司列表](https://github.com/vitejs/companies-using-vite)。令人欣喜的是,许多开发者提交 PR 将他们的公司添加到列表中。回首 Vite 诞生至今,我们共同打造的生态系统增长速度之快,实在令人难以置信。

![Vite weekly npm downloads](/vite6-npm-weekly-downloads.png)
![Vite weekly npm downloads](../images/vite6-npm-weekly-downloads.webp)

### 加速 Vite 生态系统 {#speeding-up-the-vite-ecosystem}

Expand Down
4 changes: 2 additions & 2 deletions blog/announcing-vite7.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ head:
content: Announcing Vite 7
- - meta
- property: og:image
content: https://vite.dev/og-image-announcing-vite7.png
content: https://vite.dev/og-image-announcing-vite7.webp
- - meta
- property: og:url
content: https://vite.dev/blog/announcing-vite7
Expand All @@ -29,7 +29,7 @@ head:

_2025年6月24日_

![Vite 7 Announcement Cover Image](/og-image-announcing-vite7.png)
![Vite 7 Announcement Cover Image](/og-image-announcing-vite7.webp)

我们很高兴与大家分享 Vite 7 的发布!从 Evan You 向 Vite 仓库提交第一次 commit 至今已经过去 5 年了,当时没有人能预料到前端生态会发生如此巨大的变化。如今,大多数现代前端框架和工具正在协同工作,构建在 Vite 共享的基础设施之上。通过更高层次的共享,它们能够以更快的速度进行创新。Vite 现在每周被下载 3100 万次,在上次重大版本发布后的七个月内增长了 1400 万次下载量。

Expand Down
2 changes: 1 addition & 1 deletion guide/api-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Vite 努力秉承开箱即用的原则,因此在创作一款新插件前,请

::: tip
在学习、调试或创作插件时,我们建议在你的项目中引入 [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect)。 它可以帮助你检查 Vite 插件的中间状态。安装后,你可以访问 `localhost:5173/__inspect/` 来检查你项目的模块和栈信息。请查阅 [vite-plugin-inspect 文档](https://github.com/antfu/vite-plugin-inspect) 中的安装说明。
![vite-plugin-inspect](../images/vite-plugin-inspect.png)
![vite-plugin-inspect](../images/vite-plugin-inspect.webp)
:::

## 约定 {#conventions}
Expand Down
Loading