From 10cea7dcfd163541e8afafa746015793f2daafe8 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 22 Jul 2025 23:44:28 +0900
Subject: [PATCH 01/14] fix(deps): update all non-major dependencies (#20442)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 5292f958..23e072fe 100644
--- a/package.json
+++ b/package.json
@@ -8,13 +8,13 @@
"docs-serve": "vitepress serve"
},
"devDependencies": {
- "@shikijs/vitepress-twoslash": "^3.8.0",
+ "@shikijs/vitepress-twoslash": "^3.8.1",
"@types/express": "^5.0.3",
"feed": "^5.1.0",
"gsap": "^3.13.0",
"vitepress": "^2.0.0-alpha.8",
"vitepress-plugin-group-icons": "^1.6.1",
- "vitepress-plugin-llms": "^1.7.0",
+ "vitepress-plugin-llms": "^1.7.1",
"vue": "^3.5.17"
}
}
From cae97df1807113ad176a017ca565d9efe8e13c02 Mon Sep 17 00:00:00 2001
From: thinkasany <480968828@qq.com>
Date: Wed, 23 Jul 2025 09:03:03 +0800
Subject: [PATCH 02/14] fix: resolved conflict
---
package.json | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/package.json b/package.json
index 3335008b..5aa65110 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,4 @@
{
-<<<<<<< HEAD
"name": "vite-docs-cn",
"version": "1.0.0",
"description": "Vite.js documentation Chinese translation.",
@@ -36,24 +35,4 @@
"gitHooks": {
"commit-msg": "node scripts/verifyCommit.js"
}
-=======
- "name": "docs",
- "private": true,
- "type": "module",
- "scripts": {
- "docs": "vitepress dev",
- "docs-build": "vitepress build",
- "docs-serve": "vitepress serve"
- },
- "devDependencies": {
- "@shikijs/vitepress-twoslash": "^3.8.1",
- "@types/express": "^5.0.3",
- "feed": "^5.1.0",
- "gsap": "^3.13.0",
- "vitepress": "^2.0.0-alpha.8",
- "vitepress-plugin-group-icons": "^1.6.1",
- "vitepress-plugin-llms": "^1.7.1",
- "vue": "^3.5.17"
- }
->>>>>>> 10cea7dcfd163541e8afafa746015793f2daafe8
}
From 13c261638b5b239c9ee60d8739ee1f7eef822c2a Mon Sep 17 00:00:00 2001
From: abeer0 <47961062+iiio2@users.noreply.github.com>
Date: Fri, 25 Jul 2025 07:19:27 +0600
Subject: [PATCH 03/14] docs: provide correct URL for `pnpm.overrides` (#20469)
---
guide/index.md | 2 +-
guide/troubleshooting.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/guide/index.md b/guide/index.md
index 7b50a25a..09bbc8f6 100644
--- a/guide/index.md
+++ b/guide/index.md
@@ -256,7 +256,7 @@ pnpm link --global # use your preferred package manager for this step
Then go to your Vite based project and run `pnpm link --global vite` (or the package manager that you used to link `vite` globally). Now restart the development server to ride on the bleeding edge!
::: tip Dependencies using Vite
-To replace the Vite version used by dependencies transitively, you should use [npm overrides](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#overrides) or [pnpm overrides](https://pnpm.io/package_json#pnpmoverrides).
+To replace the Vite version used by dependencies transitively, you should use [npm overrides](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#overrides) or [pnpm overrides](https://pnpm.io/9.x/package_json#pnpmoverrides).
:::
## Community
diff --git a/guide/troubleshooting.md b/guide/troubleshooting.md
index 5f87310f..bd52dcd7 100644
--- a/guide/troubleshooting.md
+++ b/guide/troubleshooting.md
@@ -150,7 +150,7 @@ You will need to access the file with `http` protocol. The easiest way to achiev
### Outdated pre-bundled deps when linking to a local package
-The hash key used to invalidate optimized dependencies depends on the package lock contents, the patches applied to dependencies, and the options in the Vite config file that affects the bundling of node modules. This means that Vite will detect when a dependency is overridden using a feature as [npm overrides](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides), and re-bundle your dependencies on the next server start. Vite won't invalidate the dependencies when you use a feature like [npm link](https://docs.npmjs.com/cli/v9/commands/npm-link). In case you link or unlink a dependency, you'll need to force re-optimization on the next server start by using `vite --force`. We recommend using overrides instead, which are supported now by every package manager (see also [pnpm overrides](https://pnpm.io/package_json#pnpmoverrides) and [yarn resolutions](https://yarnpkg.com/configuration/manifest/#resolutions)).
+The hash key used to invalidate optimized dependencies depends on the package lock contents, the patches applied to dependencies, and the options in the Vite config file that affects the bundling of node modules. This means that Vite will detect when a dependency is overridden using a feature as [npm overrides](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides), and re-bundle your dependencies on the next server start. Vite won't invalidate the dependencies when you use a feature like [npm link](https://docs.npmjs.com/cli/v9/commands/npm-link). In case you link or unlink a dependency, you'll need to force re-optimization on the next server start by using `vite --force`. We recommend using overrides instead, which are supported now by every package manager (see also [pnpm overrides](https://pnpm.io/9.x/package_json#pnpmoverrides) and [yarn resolutions](https://yarnpkg.com/configuration/manifest/#resolutions)).
## Performance Bottlenecks
From a8bd58d0cb875b5b29af9d25d7ed2bdef4613eaa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 11:56:44 +0900
Subject: [PATCH 04/14] feat: add `server.warmupRequest` to future deprecation
(#20431)
---
changes/per-environment-apis.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md
index 97817e7d..8fa47534 100644
--- a/changes/per-environment-apis.md
+++ b/changes/per-environment-apis.md
@@ -15,6 +15,7 @@ The `Environment` instance was first introduced at `v6.0`. The deprecation of `s
future: {
removeServerModuleGraph: 'warn',
removeServerTransformRequest: 'warn',
+ removeServerWarmupRequest: 'warn',
}
```
From f1918340f7ab73cde3513daf415d19c19aaccaaf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 11:58:17 +0900
Subject: [PATCH 05/14] feat: add `ssrFixStacktrace` / `ssrRewriteStacktrace`
to `removeSsrLoadModule` future deprecation (#20435)
---
changes/ssr-using-modulerunner.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/changes/ssr-using-modulerunner.md b/changes/ssr-using-modulerunner.md
index fc0bc7d0..f1add2ca 100644
--- a/changes/ssr-using-modulerunner.md
+++ b/changes/ssr-using-modulerunner.md
@@ -19,3 +19,5 @@ The `server.ssrLoadModule(url)` only allows importing modules in the `ssr` e
## Migration Guide
Check out the [Environment API for Frameworks Guide](../guide/api-environment-frameworks.md).
+
+`server.ssrFixStacktrace` and `server.ssrRewriteStacktrace` does not have to be called when using the Module Runner APIs. The stack traces will be updated unless `sourcemapInterceptor` is set to `false`.
From c46a93bd48f8c88ef5f92b3ed81b47f814db30d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 11:59:16 +0900
Subject: [PATCH 06/14] feat: add `removeServerPluginContainer` future
deprecation (#20437)
---
changes/per-environment-apis.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md
index 8fa47534..2115be3b 100644
--- a/changes/per-environment-apis.md
+++ b/changes/per-environment-apis.md
@@ -14,6 +14,7 @@ The `Environment` instance was first introduced at `v6.0`. The deprecation of `s
```ts
future: {
removeServerModuleGraph: 'warn',
+ removeServerPluginContainer: 'warn',
removeServerTransformRequest: 'warn',
removeServerWarmupRequest: 'warn',
}
@@ -30,5 +31,6 @@ In Vite v6, it is now possible to create any number of custom environments (`cli
## Migration Guide
- `server.moduleGraph` -> [`environment.moduleGraph`](/guide/api-environment-instances#separate-module-graphs)
+- `server.pluginContainer` -> `environment.pluginContainer`
- `server.transformRequest(url, ssr)` -> `environment.transformRequest(url)`
- `server.warmupRequest(url, ssr)` -> `environment.warmupRequest(url)`
From 38ae63831b8803cdbfdecffa9919dcb3131690fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 12:05:26 +0900
Subject: [PATCH 07/14] refactor: use `http-proxy-3` (#20402)
---
config/preview-options.md | 2 +-
config/server-options.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/preview-options.md b/config/preview-options.md
index 5f954613..acab6a34 100644
--- a/config/preview-options.md
+++ b/config/preview-options.md
@@ -80,7 +80,7 @@ Automatically open the app in the browser on server start. When the value is a s
Configure custom proxy rules for the preview server. Expects an object of `{ key: options }` pairs. If the key starts with `^`, it will be interpreted as a `RegExp`. The `configure` option can be used to access the proxy instance.
-Uses [`http-proxy`](https://github.com/http-party/node-http-proxy). Full options [here](https://github.com/http-party/node-http-proxy#options).
+Uses [`http-proxy-3`](https://github.com/sagemathinc/http-proxy-3). Full options [here](https://github.com/sagemathinc/http-proxy-3#options).
## preview.cors
diff --git a/config/server-options.md b/config/server-options.md
index 6ee6935f..62bdcc4d 100644
--- a/config/server-options.md
+++ b/config/server-options.md
@@ -122,7 +122,7 @@ Configure custom proxy rules for the dev server. Expects an object of `{ key: op
Note that if you are using non-relative [`base`](/config/shared-options.md#base), you must prefix each key with that `base`.
-Extends [`http-proxy`](https://github.com/http-party/node-http-proxy#options). Additional options are [here](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/proxy.ts#L13).
+Extends [`http-proxy-3`](https://github.com/sagemathinc/http-proxy-3#options). Additional options are [here](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/proxy.ts#L13).
In some cases, you might also want to configure the underlying dev server (e.g. to add custom middlewares to the internal [connect](https://github.com/senchalabs/connect) app). In order to do that, you need to write your own [plugin](/guide/using-plugins.html) and use [configureServer](/guide/api-plugin.html#configureserver) function.
From d107b40ab8f1efac5c13b5719e73a9bffce90482 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 12:24:46 +0900
Subject: [PATCH 08/14] feat: implement `removeServerHot` future deprecation
(#20434)
---
changes/per-environment-apis.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md
index 2115be3b..70a7faea 100644
--- a/changes/per-environment-apis.md
+++ b/changes/per-environment-apis.md
@@ -15,6 +15,7 @@ The `Environment` instance was first introduced at `v6.0`. The deprecation of `s
future: {
removeServerModuleGraph: 'warn',
removeServerPluginContainer: 'warn',
+ removeServerHot: 'warn',
removeServerTransformRequest: 'warn',
removeServerWarmupRequest: 'warn',
}
@@ -34,3 +35,4 @@ In Vite v6, it is now possible to create any number of custom environments (`cli
- `server.pluginContainer` -> `environment.pluginContainer`
- `server.transformRequest(url, ssr)` -> `environment.transformRequest(url)`
- `server.warmupRequest(url, ssr)` -> `environment.warmupRequest(url)`
+- `server.hot` -> `server.client.environment.hot`
From 3330b789c409a5c37b0652b891e883f767f94586 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 12:33:38 +0900
Subject: [PATCH 09/14] feat: add `removeServerReloadModule` future deprecation
(#20436)
---
changes/per-environment-apis.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md
index 70a7faea..e0739033 100644
--- a/changes/per-environment-apis.md
+++ b/changes/per-environment-apis.md
@@ -14,6 +14,7 @@ The `Environment` instance was first introduced at `v6.0`. The deprecation of `s
```ts
future: {
removeServerModuleGraph: 'warn',
+ removeServerReloadModule: 'warn',
removeServerPluginContainer: 'warn',
removeServerHot: 'warn',
removeServerTransformRequest: 'warn',
@@ -32,6 +33,7 @@ In Vite v6, it is now possible to create any number of custom environments (`cli
## Migration Guide
- `server.moduleGraph` -> [`environment.moduleGraph`](/guide/api-environment-instances#separate-module-graphs)
+- `server.reloadModule(module)` -> `environment.reloadModule(module)`
- `server.pluginContainer` -> `environment.pluginContainer`
- `server.transformRequest(url, ssr)` -> `environment.transformRequest(url)`
- `server.warmupRequest(url, ssr)` -> `environment.warmupRequest(url)`
From eae0e29c0aec1b2781262b2a2c42552bfb49056f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 15:48:31 +0900
Subject: [PATCH 10/14] docs: add NonInheritBadge to options that are not
inherited to other environments (#20471)
---
.../theme/components/NonInheritBadge.vue | 8 ++++++++
.vitepress/theme/index.ts | 2 ++
config/dep-optimization-options.md | 18 +++++++++---------
config/shared-options.md | 4 ++--
guide/api-environment.md | 2 +-
5 files changed, 22 insertions(+), 12 deletions(-)
create mode 100644 .vitepress/theme/components/NonInheritBadge.vue
diff --git a/.vitepress/theme/components/NonInheritBadge.vue b/.vitepress/theme/components/NonInheritBadge.vue
new file mode 100644
index 00000000..34c4c0fb
--- /dev/null
+++ b/.vitepress/theme/components/NonInheritBadge.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts
index b59bff21..6f81f73e 100644
--- a/.vitepress/theme/index.ts
+++ b/.vitepress/theme/index.ts
@@ -9,6 +9,7 @@ import AsideSponsors from './components/AsideSponsors.vue'
import SvgImage from './components/SvgImage.vue'
import YouTubeVideo from './components/YouTubeVideo.vue'
import SponsorBanner from './components/SponsorBanner.vue'
+import NonInheritBadge from './components/NonInheritBadge.vue'
import 'virtual:group-icons.css'
export default {
@@ -22,6 +23,7 @@ export default {
enhanceApp({ app }) {
app.component('SvgImage', SvgImage)
app.component('YouTubeVideo', YouTubeVideo)
+ app.component('NonInheritBadge', NonInheritBadge)
app.use(TwoslashFloatingVue)
},
} satisfies Theme
diff --git a/config/dep-optimization-options.md b/config/dep-optimization-options.md
index 8008b331..2021d329 100644
--- a/config/dep-optimization-options.md
+++ b/config/dep-optimization-options.md
@@ -4,7 +4,7 @@
Unless noted, the options in this section are only applied to the dependency optimizer, which is only used in dev.
-## optimizeDeps.entries
+## optimizeDeps.entries
- **Type:** `string | string[]`
@@ -12,7 +12,7 @@ By default, Vite will crawl all your `.html` files to detect dependencies that n
If neither of these fit your needs, you can specify custom entries using this option - the value should be a [`tinyglobby` pattern](https://github.com/SuperchupuDev/tinyglobby) or array of patterns that are relative from Vite project root. This will overwrite default entries inference. Only `node_modules` and `build.outDir` folders will be ignored by default when `optimizeDeps.entries` is explicitly defined. If other folders need to be ignored, you can use an ignore pattern as part of the entries list, marked with an initial `!`. `node_modules` will not be ignored for patterns that explicitly include the string `node_modules`.
-## optimizeDeps.exclude
+## optimizeDeps.exclude
- **Type:** `string[]`
@@ -33,7 +33,7 @@ export default defineConfig({
:::
-## optimizeDeps.include
+## optimizeDeps.include
- **Type:** `string[]`
@@ -51,7 +51,7 @@ export default defineConfig({
})
```
-## optimizeDeps.esbuildOptions
+## optimizeDeps.esbuildOptions
- **Type:** [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)`<`[`EsbuildBuildOptions`](https://esbuild.github.io/api/#general-options)`,
| 'bundle'
@@ -72,20 +72,20 @@ Certain options are omitted since changing them would not be compatible with Vit
- `external` is also omitted, use Vite's `optimizeDeps.exclude` option
- `plugins` are merged with Vite's dep plugin
-## optimizeDeps.force
+## optimizeDeps.force
- **Type:** `boolean`
Set to `true` to force dependency pre-bundling, ignoring previously cached optimized dependencies.
-## optimizeDeps.noDiscovery
+## optimizeDeps.noDiscovery
- **Type:** `boolean`
- **Default:** `false`
When set to `true`, automatic dependency discovery will be disabled and only dependencies listed in `optimizeDeps.include` will be optimized. CJS-only dependencies must be present in `optimizeDeps.include` during dev.
-## optimizeDeps.holdUntilCrawlEnd
+## optimizeDeps.holdUntilCrawlEnd
- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/15834)
- **Type:** `boolean`
@@ -93,7 +93,7 @@ When set to `true`, automatic dependency discovery will be disabled and only dep
When enabled, it will hold the first optimized deps results until all static imports are crawled on cold start. This avoids the need for full-page reloads when new dependencies are discovered and they trigger the generation of new common chunks. If all dependencies are found by the scanner plus the explicitly defined ones in `include`, it is better to disable this option to let the browser process more requests in parallel.
-## optimizeDeps.disabled
+## optimizeDeps.disabled
- **Deprecated**
- **Experimental:** [Give Feedback](https://github.com/vitejs/vite/discussions/13839)
@@ -108,7 +108,7 @@ To disable the optimizer completely, use `optimizeDeps.noDiscovery: true` to dis
Optimizing dependencies during build time was an **experimental** feature. Projects trying out this strategy also removed `@rollup/plugin-commonjs` using `build.commonjsOptions: { include: [] }`. If you did so, a warning will guide you to re-enable it to support CJS only packages while bundling.
:::
-## optimizeDeps.needsInterop
+## optimizeDeps.needsInterop
- **Experimental**
- **Type:** `string[]`
diff --git a/config/shared-options.md b/config/shared-options.md
index eb2d2cbb..b2da7523 100644
--- a/config/shared-options.md
+++ b/config/shared-options.md
@@ -114,7 +114,7 @@ If you have duplicated copies of the same dependency in your app (likely due to
For SSR builds, deduplication does not work for ESM build outputs configured from `build.rollupOptions.output`. A workaround is to use CJS build outputs until ESM has better plugin support for module loading.
:::
-## resolve.conditions
+## resolve.conditions
- **Type:** `string[]`
- **Default:** `['module', 'browser', 'development|production']` (`defaultClientConditions`)
@@ -140,7 +140,7 @@ Here, `import` and `require` are "conditions". Conditions can be nested and shou
Note that `import`, `require`, `default` conditions are always applied if the requirements are met.
-## resolve.mainFields
+## resolve.mainFields
- **Type:** `string[]`
- **Default:** `['browser', 'module', 'jsnext:main', 'jsnext']` (`defaultClientMainFields`)
diff --git a/guide/api-environment.md b/guide/api-environment.md
index c9a82fd0..bfc0a7f1 100644
--- a/guide/api-environment.md
+++ b/guide/api-environment.md
@@ -70,7 +70,7 @@ export default {
}
```
-When not explicitly documented, environment inherits the configured top-level config options (for example, the new `server` and `edge` environments will inherit the `build.sourcemap: false` option). A small number of top-level options, like `optimizeDeps`, only apply to the `client` environment, as they don't work well when applied as a default to server environments. The `client` environment can also be configured explicitly through `environments.client`, but we recommend to do it with the top-level options so the client config remains unchanged when adding new environments.
+When not explicitly documented, environment inherits the configured top-level config options (for example, the new `server` and `edge` environments will inherit the `build.sourcemap: false` option). A small number of top-level options, like `optimizeDeps`, only apply to the `client` environment, as they don't work well when applied as a default to server environments. Those options have badge in [the reference](/config/). The `client` environment can also be configured explicitly through `environments.client`, but we recommend to do it with the top-level options so the client config remains unchanged when adding new environments.
The `EnvironmentOptions` interface exposes all the per-environment options. There are environment options that apply to both `build` and `dev`, like `resolve`. And there are `DevEnvironmentOptions` and `BuildEnvironmentOptions` for dev and build specific options (like `dev.warmup` or `build.outDir`). Some options like `optimizeDeps` only applies to dev, but is kept as top level instead of nested in `dev` for backward compatibility.
From 5d99c0989e687d5b42215d26aeec2e1eb76995d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0?=
Date: Fri, 25 Jul 2025 16:42:14 +0900
Subject: [PATCH 11/14] docs: minor fixes (#20475)
---
.vitepress/theme/components/SponsorBanner.vue | 2 +-
.../landing/3. frameworks-section/FrameworkCard.vue | 1 +
.../components/landing/4. community-section/CommunityCard.vue | 1 +
.../landing/4. community-section/CommunitySection.vue | 4 ++--
.../components/landing/5. sponsor-section/SponsorSection.vue | 3 ++-
guide/index.md | 2 +-
6 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.vitepress/theme/components/SponsorBanner.vue b/.vitepress/theme/components/SponsorBanner.vue
index 7bf922af..7c1371e7 100644
--- a/.vitepress/theme/components/SponsorBanner.vue
+++ b/.vitepress/theme/components/SponsorBanner.vue
@@ -80,7 +80,7 @@ function dismiss() {
Register