Skip to content

Commit c7daa12

Browse files
authored
Merge pull request #1510 from lxKylin/8e72-1
docs: update content
2 parents d25c99f + 4489b65 commit c7daa12

3 files changed

Lines changed: 1 addition & 64 deletions

File tree

guide/api-environment-frameworks.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,7 @@ export function createHandler(input) {
308308
309309
在命令行接口中,调用 `vite build``vite build --ssr` 仍将只构建客户端和仅 ssr 环境以保证向后兼容性。
310310
311-
<<<<<<< HEAD
312-
`builder``undefined` 时(或者调用 `vite build --app`)时,`vite build` 将选择构建整个应用。这将在未来的主要版本中成为默认设置。将创建一个 `ViteBuilder` 实例(构建时等同于 `ViteDevServer`),用于为生产环境构建所有配置的环境。默认情况下,环境的构建按照 `environments` 记录的顺序依次运行。框架或用户可以进一步配置环境的构建方式,使用:
313-
=======
314-
When `builder` option is not `undefined` (or when calling `vite build --app`), `vite build` will opt-in into building the entire app instead. This would later on become the default in a future major. A `ViteBuilder` instance will be created (build-time equivalent to a `ViteDevServer`) to build all configured environments for production. By default the build of environments is run in series respecting the order of the `environments` record. A framework or user can further configure how the environments are built using `builder.buildApp` option:
315-
>>>>>>> d2208e7223406bb114ca27b017c7a2b1155b11a5
311+
`builder` 选项 为 `undefined` 时(或者调用 `vite build --app`)时,`vite build` 将选择构建整个应用。这将在未来的主要版本中成为默认设置。将创建一个 `ViteBuilder` 实例(构建时等同于 `ViteDevServer`),用于为生产环境构建所有配置的环境。默认情况下,环境的构建按照 `environments` 记录的顺序依次运行。框架或用户可以进一步使用 `builder.buildApp` 选项配置环境的构建方式:
316312
317313
```js [vite.config.js]
318314
import { defineConfig } from 'vite'

guide/migration.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
如果正在从 `rolldown-vite` 进行迁移,那么只有标题中包含 <Badge text="NRV" type="warning" /> 的部分适用。
44

5-
<<<<<<< HEAD
65
## 浏览器兼容性目标变更 [<Badge text="NRV" type="warning" />](#migration-from-v7) {#default-browser-target-change}
7-
=======
8-
## Default Browser Target Change [<Badge text="NRV" type="warning" />](#migration-from-v7)
9-
>>>>>>> d2208e7223406bb114ca27b017c7a2b1155b11a5
106

117
`build.target``'baseline-widely-available'` 的默认浏览器值已更新为较新的浏览器版本:
128

@@ -36,11 +32,7 @@ Vite 8 使用基于 Rolldown 和 Oxc 的工具,而不是 esbuild 和 Rollup。
3632
}
3733
```
3834

39-
<<<<<<< HEAD
4035
### 依赖优化器现在使用 Rolldown {#dependency-optimizer-now-uses-rolldown}
41-
=======
42-
### Dependency Optimizer Now Uses Rolldown
43-
>>>>>>> d2208e7223406bb114ca27b017c7a2b1155b11a5
4436

4537
现在依赖优化使用 Rolldown 而不是 esbuild。Vite 仍然通过自动将 [`optimizeDeps.esbuildOptions`](/config/dep-optimization-options#optimizedeps-esbuildoptions) 转换为 [`optimizeDeps.rolldownOptions`](/config/dep-optimization-options#optimizedeps-rolldownoptions) 来支持向后兼容。`optimizeDeps.esbuildOptions` 现在已被弃用,将来会被移除,我们鼓励您迁移到 `optimizeDeps.rolldownOptions`
4638

@@ -346,27 +338,17 @@ const plugin = {
346338

347339
## 总体变化 [<Badge text="NRV" type="warning" />](#migration-from-v7) {#general-changes}
348340

349-
<<<<<<< HEAD
350341
## 移除了已弃用的功能 [<Badge text="NRV" type="warning" />](#migration-from-v7) {#removed-deprecated-features}
351-
=======
352-
## Removed Deprecated Features [<Badge text="NRV" type="warning" />](#migration-from-v7)
353-
>>>>>>> d2208e7223406bb114ca27b017c7a2b1155b11a5
354342

355343
**_TODO:此更改尚未实现,但将在稳定版发布前实现。_**
356344

357345
## 进阶 {#advanced}
358346

359347
还有其他一些只影响少数用户的破坏性更改。
360348

361-
<<<<<<< HEAD
362349
- **[TODO: 这将在稳定版发布前修复]** https://github.com/rolldown/rolldown/issues/5726 (affects nuxt, qwik)
363-
- **[TODO: 这将在稳定版发布前修复]** https://github.com/rolldown/rolldown/issues/3403 (affects sveltekit)
364350
- **[TODO: 这将在稳定版发布前修复]** 由于缺少预构建块输出功能([rolldown#4304](https://github.com/rolldown/rolldown/issues/4034)),旧版块现在作为资源文件而不是块文件输出。这意味着块相关选项不适用于旧版块,清单文件也不会将旧版块包含为块文件。
365-
- **[TODO: 这将在稳定版发布前修复]** 解析器缓存在 Vitest 中破坏了一些边缘情况 ([rolldown-vite#466](https://github.com/vitejs/rolldown-vite/issues/466), [vitest#8754](https://github.com/vitest-dev/vitest/issues/8754#issuecomment-3441115032))
366-
- **[TODO: 这将在稳定版发布前修复]** 解析器无法与 yarn pnp 配合使用 ([rolldown-vite#324](https://github.com/vitejs/rolldown-vite/issues/324), [rolldown-vite#392](https://github.com/vitejs/rolldown-vite/issues/392))
367-
- **[TODO: 这将在稳定版发布前修复]** 原生插件排序问题 ([rolldown-vite#373](https://github.com/vitejs/rolldown-vite/issues/373))
368351
- **[TODO: 这将在稳定版发布前修复]** `@vite-ignore` 注释边缘情况 ([rolldown-vite#426](https://github.com/vitejs/rolldown-vite/issues/426))
369-
- **[TODO: 这将在稳定版发布前修复]** https://github.com/rolldown/rolldown/issues/3403
370352
- [Extglobs](https://github.com/micromatch/picomatch/blob/master/README.md#extglobs) 尚未得到支持 ([rolldown-vite#365](https://github.com/vitejs/rolldown-vite/issues/365))
371353
- `define` 不共享对象引用:当你传递一个对象作为 `define` 的值时,每个变量都会有一个单独的对象副本。详见 [Oxc 转换器文档](https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define)
372354
- `bundle` 对象变更(`bundle` 是在 `generateBundle` / `writeBundle` 钩子中传递的对象,由 `build` 函数返回):
@@ -378,22 +360,6 @@ const plugin = {
378360
- 使用 plugin-legacy 转换到低于 ES5 的版本不受支持 ([rolldown-vite#452](https://github.com/vitejs/rolldown-vite/issues/452))
379361
-`build.target` 选项传递同一浏览器的多个版本现在会报错:esbuild 会选择最新的版本,这可能不是你的本意。
380362
- Rolldown 缺少支持:以下功能不受 Rolldown 支持,Vite 也不再支持这些功能。
381-
=======
382-
- **[TODO: this will be fixed before stable release]** https://github.com/rolldown/rolldown/issues/5726 (affects nuxt, qwik)
383-
- **[TODO: this will be fixed before stable release]** Legacy chunks are emitted as an asset file instead of a chunk file due to the lack of prebuilt chunk emit feature ([rolldown#4304](https://github.com/rolldown/rolldown/issues/4034)). This means the chunk related options does not apply to legacy chunks and the manifest file will not include legacy chunks as a chunk file.
384-
- **[TODO: this will be fixed before stable release]** `@vite-ignore` comment edge case ([rolldown-vite#426](https://github.com/vitejs/rolldown-vite/issues/426))
385-
- [Extglobs](https://github.com/micromatch/picomatch/blob/master/README.md#extglobs) are not supported yet ([rolldown-vite#365](https://github.com/vitejs/rolldown-vite/issues/365))
386-
- `define` does not share reference for objects: When you pass an object as a value to `define`, each variable will have a separate copy of the object. See [Oxc Transformer document](https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define) for more details.
387-
- `bundle` object changes (`bundle` is an object passed in `generateBundle` / `writeBundle` hooks, returned by `build` function):
388-
- Assigning to `bundle[foo]` is not supported. This is discouraged by Rollup as well. Please use `this.emitFile()` instead.
389-
- the reference is not shared across the hooks ([rolldown-vite#410](https://github.com/vitejs/rolldown-vite/issues/410))
390-
- `structuredClone(bundle)` errors with `DataCloneError: #<Object> could not be cloned`. This is not supported anymore. Please clone it with `structuredClone({ ...bundle })`. ([rolldown-vite#128](https://github.com/vitejs/rolldown-vite/issues/128))
391-
- All parallel hooks in Rollup works as sequential hooks. See [Rolldown's documentation](https://rolldown.rs/apis/plugin-api#sequential-hook-execution) for more details.
392-
- `"use strict";` is not injected sometimes. See [Rolldown's documentation](https://rolldown.rs/in-depth/directives) for more details.
393-
- Transforming to lower than ES5 with plugin-legacy is not supported ([rolldown-vite#452](https://github.com/vitejs/rolldown-vite/issues/452))
394-
- Passing the same browser with multiple versions of it to `build.target` option now errors: esbuild selects the latest version of it, which was probably not what you intended.
395-
- Missing support by Rolldown: The following features are not supported by Rolldown and is no longer supported by Vite.
396-
>>>>>>> d2208e7223406bb114ca27b017c7a2b1155b11a5
397363
- `build.rollupOptions.output.format: 'system'` ([rolldown#2387](https://github.com/rolldown/rolldown/issues/2387))
398364
- `build.rollupOptions.output.format: 'amd'` ([rolldown#2387](https://github.com/rolldown/rolldown/issues/2528))
399365
- 完整的 TypeScript 遗留命名空间支持 ([oxc-project/oxc#14227](https://github.com/oxc-project/oxc/issues/14227))

package.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
<<<<<<< HEAD
32
"name": "vite-docs-cn",
43
"version": "8.0.0-beta.0",
54
"description": "Vite.js documentation Chinese translation.",
@@ -39,28 +38,4 @@
3938
"gitHooks": {
4039
"commit-msg": "node scripts/verifyCommit.js"
4140
}
42-
=======
43-
"name": "@vitejs/monorepo-docs",
44-
"private": true,
45-
"type": "module",
46-
"scripts": {
47-
"typecheck": "vue-tsc",
48-
"docs": "vitepress dev",
49-
"docs-build": "vitepress build",
50-
"docs-serve": "vitepress serve"
51-
},
52-
"devDependencies": {
53-
"@shikijs/vitepress-twoslash": "^3.20.0",
54-
"@types/express": "^5.0.6",
55-
"feed": "^5.1.0",
56-
"gsap": "^3.14.2",
57-
"markdown-it-image-size": "^15.0.1",
58-
"oxc-minify": "^0.107.0",
59-
"vitepress": "^2.0.0-alpha.15",
60-
"vitepress-plugin-group-icons": "^1.6.5",
61-
"vitepress-plugin-llms": "^1.10.0",
62-
"vue": "^3.5.26",
63-
"vue-tsc": "^3.2.2"
64-
}
65-
>>>>>>> d2208e7223406bb114ca27b017c7a2b1155b11a5
6641
}

0 commit comments

Comments
 (0)