Skip to content

Commit a9828a8

Browse files
committed
chore: merge main
2 parents 1ee8ef4 + c7c1743 commit a9828a8

File tree

46 files changed

+1578
-1414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1578
-1414
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Get changed files
4848
id: changed-files
49-
uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45.0.7
49+
uses: tj-actions/changed-files@a284dc1814e3fd07f2e34267fc8f81227ed29fb8 # v45.0.9
5050
with:
5151
files: |
5252
docs/**

docs/.vitepress/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export default defineConfig({
139139
pt: { label: 'Português', link: 'https://pt.vite.dev' },
140140
ko: { label: '한국어', link: 'https://ko.vite.dev' },
141141
de: { label: 'Deutsch', link: 'https://de.vite.dev' },
142+
fa: { label: 'فارسی', link: 'https://fa.vite.dev' },
142143
},
143144

144145
themeConfig: {
@@ -425,15 +426,15 @@ export default defineConfig({
425426
link: '/changes/hotupdate-hook',
426427
},
427428
{
428-
text: 'Move to per-environment APIs',
429+
text: 'Move to Per-environment APIs',
429430
link: '/changes/per-environment-apis',
430431
},
431432
{
432-
text: 'SSR using ModuleRunner API',
433+
text: 'SSR Using ModuleRunner API',
433434
link: '/changes/ssr-using-modulerunner',
434435
},
435436
{
436-
text: 'Shared plugins during build',
437+
text: 'Shared Plugins During Build',
437438
link: '/changes/shared-plugins-during-build',
438439
},
439440
],

docs/blog/announcing-vite5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ _November 16, 2023_
3333

3434
Vite 4 [was released](./announcing-vite4.md) almost a year ago, and it served as a solid base for the ecosystem. npm downloads per week jumped from 2.5 million to 7.5 million, as projects keep building on a shared infrastructure. Frameworks continued to innovate, and on top of [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/), between others, we saw new frameworks joining and making the ecosystem stronger. [RedwoodJS](https://redwoodjs.com/) and [Remix](https://remix.run/) switching to Vite paves the way for further adoption in the React ecosystem. [Vitest](https://vitest.dev) kept growing at an even faster pace than Vite. Its team has been hard at work and will soon [release Vitest 1.0](https://github.com/vitest-dev/vitest/issues/3596). The story of Vite when used with other tools such as [Storybook](https://storybook.js.org), [Nx](https://nx.dev), and [Playwright](https://playwright.dev) kept improving, and the same goes for environments, with Vite dev working both in [Deno](https://deno.com) and [Bun](https://bun.sh).
3535

36-
We had the second edition of [ViteConf](https://viteconf.org/23/replay) a month ago, hosted by [StackBlitz](https://stackblitz.com). Like last year, most of the projects in the ecosystem got together to share ideas and connect to keep expanding the commons. We're also seeing new pieces complement the meta-framework tool belt like [Volar](https://volarjs.dev/) and [Nitro](https://nitro.unjs.io/). The Rollup team released [Rollup 4](https://rollupjs.org) that same day, a tradition Lukas started last year.
36+
We had the second edition of [ViteConf](https://viteconf.org/23/replay) a month ago, hosted by [StackBlitz](https://stackblitz.com). Like last year, most of the projects in the ecosystem got together to share ideas and connect to keep expanding the commons. We're also seeing new pieces complement the meta-framework tool belt like [Volar](https://volarjs.dev/) and [Nitro](https://nitro.build/). The Rollup team released [Rollup 4](https://rollupjs.org) that same day, a tradition Lukas started last year.
3737

3838
Six months ago, Vite 4.3 [was released](./announcing-vite4.md). This release significantly improved the dev server performance. However, there is still ample room for improvement. At ViteConf, [Evan You unveiled Vite's long-term plan to work on Rolldown](https://www.youtube.com/watch?v=hrdwQHoAp0M), a Rust-port of Rollup with compatible APIs. Once it is ready, we intend to use it in Vite Core to take on the tasks of both Rollup and esbuild. This will mean a boost in build performance (and later on in dev performance too as we move perf-sensitive parts of Vite itself to Rust), and a big reduction of inconsistencies between dev and build. Rolldown is currently in early stages and the team is preparing to open source the codebase before the end of the year. Stay tuned!
3939

docs/changes/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ We don't recommend switching to these APIs yet. They are included in Vite to hel
1616

1717
- [`this.environment` in Hooks](/changes/this-environment-in-hooks)
1818
- [HMR `hotUpdate` Plugin Hook](/changes/hotupdate-hook)
19-
- [Move to per-environment APIs](/changes/per-environment-apis)
20-
- [SSR using `ModuleRunner` API](/changes/ssr-using-modulerunner)
21-
- [Shared plugins during build](/changes/shared-plugins-during-build)
19+
- [Move to Per-environment APIs](/changes/per-environment-apis)
20+
- [SSR Using `ModuleRunner` API](/changes/ssr-using-modulerunner)
21+
- [Shared Plugins During Build](/changes/shared-plugins-during-build)
2222

2323
## Past
2424

docs/changes/per-environment-apis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Move to per-environment APIs
1+
# Move to Per-environment APIs
22

33
::: tip Feedback
44
Give us feedback at [Environment API feedback discussion](https://github.com/vitejs/vite/discussions/16358)

docs/changes/ssr-using-modulerunner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SSR using `ModuleRunner` API
1+
# SSR Using `ModuleRunner` API
22

33
::: tip Feedback
44
Give us feedback at [Environment API feedback discussion](https://github.com/vitejs/vite/discussions/16358)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Affect scope: `Vite Plugin Authors`
1818

1919
## Migration Guide
2020

21-
For the existing plugin to do a quick migration, replace the `options.ssr` argument with `this.environment.name !== 'client'` in the `resolveId`, `load` and `transform` hooks:
21+
For the existing plugin to do a quick migration, replace the `options.ssr` argument with `this.environment.config.consumer === 'server'` in the `resolveId`, `load` and `transform` hooks:
2222

2323
```ts
2424
import { Plugin } from 'vite'
@@ -28,7 +28,7 @@ export function myPlugin(): Plugin {
2828
name: 'my-plugin',
2929
resolveId(id, importer, options) {
3030
const isSSR = options.ssr // [!code --]
31-
const isSSR = this.environment.name !== 'client' // [!code ++]
31+
const isSSR = this.environment.config.consumer === 'server' // [!code ++]
3232

3333
if (isSSR) {
3434
// SSR specific logic

docs/config/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
}
1515
```
1616

17-
Note Vite supports using ES modules syntax in the config file even if the project is not using native Node ESM, e.g. `type: "module"` in `package.json`. In this case, the config file is auto pre-processed before load.
17+
Note Vite supports using ES modules syntax in the config file even if the project is not using native Node ESM, e.g. `"type": "module"` in `package.json`. In this case, the config file is auto pre-processed before load.
1818

1919
You can also explicitly specify a config file to use with the `--config` CLI option (resolved relative to `cwd`):
2020

docs/guide/api-environment-frameworks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Resources:
1111
Please share your feedback with us.
1212
:::
1313

14-
## Environments and frameworks
14+
## Environments and Frameworks
1515

1616
The implicit `ssr` environment and other non-client environments use a `RunnableDevEnvironment` by default during dev. While this requires the runtime to be the same with the one the Vite server is running in, this works similarly with `ssrLoadModule` and allows frameworks to migrate and enable HMR for their SSR dev story. You can guard any runnable environment with an `isRunnableDevEnvironment` function.
1717

docs/guide/api-environment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ We don't recommend switching to Environment API yet. We are aiming for a good po
125125

126126
- [`this.environment` in Hooks](/changes/this-environment-in-hooks)
127127
- [HMR `hotUpdate` Plugin Hook](/changes/hotupdate-hook)
128-
- [Move to per-environment APIs](/changes/per-environment-apis)
129-
- [SSR using `ModuleRunner` API](/changes/ssr-using-modulerunner)
130-
- [Shared plugins during build](/changes/shared-plugins-during-build)
128+
- [Move to Per-environment APIs](/changes/per-environment-apis)
129+
- [SSR Using `ModuleRunner` API](/changes/ssr-using-modulerunner)
130+
- [Shared Plugins During Build](/changes/shared-plugins-during-build)
131131

132132
## Target Users
133133

0 commit comments

Comments
 (0)