Skip to content

Commit 23255a0

Browse files
sync: Update Vite docs from upstream 20250514
1 parent 69bb2e2 commit 23255a0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export default defineConfig({
136136
pt: { label: 'Português', link: 'https://pt.vite.dev' },
137137
ko: { label: '한국어', link: 'https://ko.vite.dev' },
138138
de: { label: 'Deutsch', link: 'https://de.vite.dev' },
139+
fa: { label: 'فارسی', link: 'https://fa.vite.dev' },
139140
},
140141

141142
themeConfig: {

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/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"devDependencies": {
1111
"@shikijs/vitepress-twoslash": "^2.5.0",
1212
"@types/express": "^5.0.1",
13-
"feed": "^4.2.2",
13+
"feed": "^5.0.1",
1414
"vitepress": "^1.6.3",
1515
"vitepress-plugin-group-icons": "^1.5.2",
16-
"vitepress-plugin-llms": "^1.1.0",
16+
"vitepress-plugin-llms": "^1.1.4",
1717
"vue": "^3.5.13"
1818
}
1919
}

0 commit comments

Comments
 (0)