From 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b Mon Sep 17 00:00:00 2001 From: Yuwang Liu <94501662+lyw405@users.noreply.github.com> Date: Wed, 2 Jul 2025 17:35:46 +0800 Subject: [PATCH 1/2] chore: fix typos and grammatical errors across documentation and comments (#20337) --- _data/team.js | 4 ++-- changes/index.md | 2 +- changes/per-environment-apis.md | 2 +- changes/shared-plugins-during-build.md | 4 ++-- changes/ssr-using-modulerunner.md | 4 ++-- changes/this-environment-in-hooks.md | 2 +- config/ssr-options.md | 2 +- releases.md | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/_data/team.js b/_data/team.js index 07dc3cea..7d8b1bf5 100644 --- a/_data/team.js +++ b/_data/team.js @@ -71,7 +71,7 @@ export const core = [ avatar: 'https://github.com/ArnaudBarre.png', name: 'Arnaud Barré', title: 'Frontend Developer', - desc: 'Passionate by tooling around TypeScript and React.', + desc: 'Passionate about tooling around TypeScript and React.', links: [ { icon: 'github', link: 'https://github.com/ArnaudBarre' }, { @@ -164,7 +164,7 @@ export const emeriti = [ name: 'Niputi', title: 'Developer', org: 'Computershare Denmark', - desc: 'weeb/javascript lover.', + desc: 'weeb/JavaScript lover.', links: [ { icon: 'github', link: 'https://github.com/Niputi' }, { icon: 'x', link: 'https://x.com/Niputi_' }, diff --git a/changes/index.md b/changes/index.md index 45568483..ef9ff004 100644 --- a/changes/index.md +++ b/changes/index.md @@ -22,6 +22,6 @@ We don't recommend switching to these APIs yet. They are included in Vite to hel ## Past -The changes below has been done or reverted. They are no longer relevant in the current major version. +The changes below have been done or reverted. They are no longer relevant in the current major version. - _No past changes yet_ diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md index e59f3b63..97817e7d 100644 --- a/changes/per-environment-apis.md +++ b/changes/per-environment-apis.md @@ -6,7 +6,7 @@ Give us feedback at [Environment API feedback discussion](https://github.com/vit Multiple APIs from `ViteDevServer` related to module graph and modules transforms have been moved to the `DevEnvironment` instances. -Affect scope: `Vite Plugin Authors` +Affected scope: `Vite Plugin Authors` ::: warning Future Deprecation The `Environment` instance was first introduced at `v6.0`. The deprecation of `server.moduleGraph` and other methods that are now in environments is planned for a future major. We don't recommend moving away from server methods yet. To identify your usage, set these in your vite config. diff --git a/changes/shared-plugins-during-build.md b/changes/shared-plugins-during-build.md index 730b943a..a63f8c4a 100644 --- a/changes/shared-plugins-during-build.md +++ b/changes/shared-plugins-during-build.md @@ -6,10 +6,10 @@ Give us feedback at [Environment API feedback discussion](https://github.com/vit See [Shared plugins during build](/guide/api-environment-plugins.md#shared-plugins-during-build). -Affect scope: `Vite Plugin Authors` +Affected scope: `Vite Plugin Authors` ::: warning Future Default Change -`builder.sharedConfigBuild` was first introduce in `v6.0`. You can set it true to check how your plugins work with a shared config. We're looking for feedback about changing the default in a future major once the plugin ecosystem is ready. +`builder.sharedConfigBuild` was first introduced in `v6.0`. You can set it true to check how your plugins work with a shared config. We're looking for feedback about changing the default in a future major once the plugin ecosystem is ready. ::: ## Motivation diff --git a/changes/ssr-using-modulerunner.md b/changes/ssr-using-modulerunner.md index 4b474e2a..fc0bc7d0 100644 --- a/changes/ssr-using-modulerunner.md +++ b/changes/ssr-using-modulerunner.md @@ -6,10 +6,10 @@ Give us feedback at [Environment API feedback discussion](https://github.com/vit `server.ssrLoadModule` has been replaced by importing from a [Module Runner](/guide/api-environment#modulerunner). -Affect scope: `Vite Plugin Authors` +Affected scope: `Vite Plugin Authors` ::: warning Future Deprecation -`ModuleRunner` was first introduce in `v6.0`. The deprecation of `server.ssrLoadModule` is planned for a future major. To identify your usage, set `future.removeSsrLoadModule` to `"warn"` in your vite config. +`ModuleRunner` was first introduced in `v6.0`. The deprecation of `server.ssrLoadModule` is planned for a future major. To identify your usage, set `future.removeSsrLoadModule` to `"warn"` in your vite config. ::: ## Motivation diff --git a/changes/this-environment-in-hooks.md b/changes/this-environment-in-hooks.md index 4a56ddfd..1f18637d 100644 --- a/changes/this-environment-in-hooks.md +++ b/changes/this-environment-in-hooks.md @@ -6,7 +6,7 @@ Give us feedback at [Environment API feedback discussion](https://github.com/vit Before Vite 6, only two environments were available: `client` and `ssr`. A single `options.ssr` plugin hook argument in `resolveId`, `load` and `transform` allowed plugin authors to differentiate between these two environments when processing modules in plugin hooks. In Vite 6, a Vite application can define any number of named environments as needed. We're introducing `this.environment` in the plugin context to interact with the environment of the current module in hooks. -Affect scope: `Vite Plugin Authors` +Affected scope: `Vite Plugin Authors` ::: warning Future Deprecation `this.environment` was introduced in `v6.0`. The deprecation of `options.ssr` is planned for a future major. At that point we'll start recommending migrating your plugins to use the new API. To identify your usage, set `future.removePluginHookSsrArgument` to `"warn"` in your vite config. diff --git a/config/ssr-options.md b/config/ssr-options.md index 6f07bba3..7ff3abb6 100644 --- a/config/ssr-options.md +++ b/config/ssr-options.md @@ -59,4 +59,4 @@ For example, when setting `['node', 'custom']`, you should run `NODE_OPTIONS='-- - **Type:** `string[]` - **Default:** `['module', 'jsnext:main', 'jsnext']` -List of fields in `package.json` to try when resolving a package's entry point. Note this takes lower precedence than conditional exports resolved from the `exports` field: if an entry point is successfully resolved from `exports`, the main field will be ignored. This setting only affect non-externalized dependencies. +List of fields in `package.json` to try when resolving a package's entry point. Note this takes lower precedence than conditional exports resolved from the `exports` field: if an entry point is successfully resolved from `exports`, the main field will be ignored. This setting only affects non-externalized dependencies. diff --git a/releases.md b/releases.md index 662a8e2f..b30e513d 100644 --- a/releases.md +++ b/releases.md @@ -12,7 +12,7 @@ Vite does not have a fixed release cycle. - **Minor** releases always contain new features and are released as needed. Minor releases always have a beta pre-release phase (usually every two months). - **Major** releases generally align with [Node.js EOL schedule](https://endoflife.date/nodejs), and will be announced ahead of time. These releases will go through long-term discussions with the ecosystem, and have alpha and beta pre-release phases (usually every year). -The Vite versions ranges that are supported by the Vite team is automatically determined by: +The Vite version ranges that are supported by the Vite team are automatically determined by: - **Current Minor** gets regular fixes. - **Previous Major** (only for its latest minor) and **Previous Minor** receives important fixes and security patches. From 3b4185b8268e52221386cd8b7debc44b5a6b6039 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Thu, 3 Jul 2025 09:15:22 +0800 Subject: [PATCH 2/2] fix: resolved conflict --- _data/team.js | 4 ---- changes/index.md | 4 ---- changes/per-environment-apis.md | 4 ---- changes/shared-plugins-during-build.md | 7 ------- changes/ssr-using-modulerunner.md | 7 ------- changes/this-environment-in-hooks.md | 4 ---- config/ssr-options.md | 7 ------- releases.md | 4 ---- 8 files changed, 41 deletions(-) diff --git a/_data/team.js b/_data/team.js index b0a49c60..72096ab0 100644 --- a/_data/team.js +++ b/_data/team.js @@ -164,11 +164,7 @@ export const emeriti = [ name: 'Niputi', title: 'Developer', org: 'Computershare Denmark', -<<<<<<< HEAD desc: 'Web/Javascript 爱好者', -======= - desc: 'weeb/JavaScript lover.', ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b links: [ { icon: 'github', link: 'https://github.com/Niputi' }, { icon: 'x', link: 'https://x.com/Niputi_' }, diff --git a/changes/index.md b/changes/index.md index bd7c86f8..b5392af7 100644 --- a/changes/index.md +++ b/changes/index.md @@ -22,10 +22,6 @@ Vite 中的破坏性变更列表,包括 API 废弃、移除和变更。在你 ## 历史 {#past} -<<<<<<< HEAD 以下的变更已经被实施或者撤销。在当前的主要版本中,它们已经不再相关。 -======= -The changes below have been done or reverted. They are no longer relevant in the current major version. ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b - _目前还没有历史的变更_ diff --git a/changes/per-environment-apis.md b/changes/per-environment-apis.md index 9b786c41..f384ed9a 100644 --- a/changes/per-environment-apis.md +++ b/changes/per-environment-apis.md @@ -6,11 +6,7 @@ `ViteDevServer` 中与 module graph 和 modules transforms 相关的多个 API 已移至 `DevEnvironment` 实例。 -<<<<<<< HEAD 影响范围:`Vite 插件作者` -======= -Affected scope: `Vite Plugin Authors` ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b ::: warning 即将废弃 `环境`实例首次在 `v6.0` 中引入。计划在未来的 major 版本中废弃现在的 `server.moduleGraph` 和其他方法。我们不建议你现在就放弃 server 方法。要识别你的使用情况,请在你的 vite 配置中设置以下。 diff --git a/changes/shared-plugins-during-build.md b/changes/shared-plugins-during-build.md index c150fd32..3e5d243a 100644 --- a/changes/shared-plugins-during-build.md +++ b/changes/shared-plugins-during-build.md @@ -6,17 +6,10 @@ 查看 [构建过程中的共享插件](/guide/api-environment-plugins.md#shared-plugins-during-build). -<<<<<<< HEAD 影响范围:`Vite 插件作者` ::: warning 未来默认值更改 `builder.sharedConfigBuild` 最初在 `v6.0` 版本中被引入。你可以将它设置为 `true`,以此来检查你的插件与共享配置是如何配合工作的。一旦插件生态系统准备就绪,我们希望能得到关于在未来的主要版本中改变默认设置的反馈。 -======= -Affected scope: `Vite Plugin Authors` - -::: warning Future Default Change -`builder.sharedConfigBuild` was first introduced in `v6.0`. You can set it true to check how your plugins work with a shared config. We're looking for feedback about changing the default in a future major once the plugin ecosystem is ready. ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b ::: ## 动机 {#motivation} diff --git a/changes/ssr-using-modulerunner.md b/changes/ssr-using-modulerunner.md index 699a8d1c..623d8e0e 100644 --- a/changes/ssr-using-modulerunner.md +++ b/changes/ssr-using-modulerunner.md @@ -6,17 +6,10 @@ `server.ssrLoadModule` 已被从 [Module Runner](/guide/api-environment#modulerunner) 导入所取代。 -<<<<<<< HEAD 影响范围:`Vite 插件作者` ::: warning 即将废弃 `ModuleRunner` 最初在 `v6.0` 版本中被引入。我们计划在未来的主要版本中废弃 `server.ssrLoadModule`。如果想识别你的使用情况,可以在你的 vite 配置文件中将 `future.removeSsrLoadModule` 设置为 `"warn"`。 -======= -Affected scope: `Vite Plugin Authors` - -::: warning Future Deprecation -`ModuleRunner` was first introduced in `v6.0`. The deprecation of `server.ssrLoadModule` is planned for a future major. To identify your usage, set `future.removeSsrLoadModule` to `"warn"` in your vite config. ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b ::: ## 动机 {#motivation} diff --git a/changes/this-environment-in-hooks.md b/changes/this-environment-in-hooks.md index 2608095c..6e1d8d29 100644 --- a/changes/this-environment-in-hooks.md +++ b/changes/this-environment-in-hooks.md @@ -6,11 +6,7 @@ 在 Vite 6 版本之前,只有两个环境是可用的:`client` 和 `ssr`。在 `resolveId`、`load` 和 `transform` 中的 `options.ssr` 插件钩子参数,允许插件的作者在处理插件钩子中的模块时区分这两个环境。在 Vite 6 版本中,一个 Vite 应用可以根据需要定义任意数量的命名环境。我们在插件的上下文中引入了 `this.environment`,以便在钩子中与当前模块的环境进行交互。 -<<<<<<< HEAD 影响范围:`Vite 插件作者` -======= -Affected scope: `Vite Plugin Authors` ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b ::: warning 即将废弃 `this.environment` 最初在 `v6.0` 版本中被引入。我们计划在未来的 major 版本中废弃 `options.ssr`。到那时,我们会开始建议你将你的插件迁移到新的 API。如果想识别你的使用情况,可以在你的 vite 配置文件中将 `future.removePluginHookSsrArgument` 设置为 `"warn"`。 diff --git a/config/ssr-options.md b/config/ssr-options.md index e0c7560f..0c132ed5 100644 --- a/config/ssr-options.md +++ b/config/ssr-options.md @@ -56,14 +56,7 @@ SSR 服务器的构建目标。 ## ssr.resolve.mainFields -<<<<<<< HEAD - **类型:** `string[]` - **默认:** `['module', 'jsnext:main', 'jsnext']` 在解析一个包的入口文件时,会尝试使用 `package.json` 中的字段列表。请注意,这些字段的优先级低于从条件导出解析的 `exports` 字段:如果能从 `exports` 字段成功解析出入口文件,那么 main 字段将会被忽略。此设置仅影响未外部化的依赖项。 -======= -- **Type:** `string[]` -- **Default:** `['module', 'jsnext:main', 'jsnext']` - -List of fields in `package.json` to try when resolving a package's entry point. Note this takes lower precedence than conditional exports resolved from the `exports` field: if an entry point is successfully resolved from `exports`, the main field will be ignored. This setting only affects non-externalized dependencies. ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b diff --git a/releases.md b/releases.md index c83a0500..db40ce3f 100644 --- a/releases.md +++ b/releases.md @@ -12,11 +12,7 @@ Vite 没有固定的发布周期。 - **次要版本** 总是包含新功能,并根据需要发布。且总会有一个 beta 预发布阶段(通常每两个月)。 - **主要版本** 通常与 [Node.js 生命周期终止计划](https://endoflife.date/nodejs) 保持一致,并会提前宣布。这些版本会经过与生态系统的长期讨论,并有 alpha 和 beta 预发布阶段(通常每年)。 -<<<<<<< HEAD Vite 团队支持的 Vite 版本范围是这样确定的: -======= -The Vite version ranges that are supported by the Vite team are automatically determined by: ->>>>>>> 73ecdf61522ce311228eb8d8d02b88d7f0dc7e1b - **当前次要版本** 会定期提供修复。 - **上一个主要版本** (仅限其最新的次要版本)和 **上一个次要版本** 会接收重要修复和安全补丁。