-
-
Notifications
You must be signed in to change notification settings - Fork 364
d2m #1461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
d2m #1461
Conversation
Co-authored-by: Alexander Lichter <[email protected]>
Co-authored-by: sapphi-red <[email protected]>
Co-authored-by: mdong1909 <[email protected]>
docs: update content
docs(en): merge docs-cn/sync-docs into docs-cn/dev @ 9d1e98c
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request updates the Vite documentation for version 8, which represents a major shift from using esbuild and Rollup to using Rolldown and Oxc as the underlying toolchain. The changes are comprehensive and affect documentation across configuration, guides, API references, and includes a new blog post announcing Vite 8 Beta.
Key Changes
- Toolchain Migration Documentation: Complete documentation transition from esbuild/Rollup to Rolldown/Oxc, including configuration options, API references, and migration guides
- New Migration Guides: Splits migration documentation into separate guides for v6→v7 (
guide/migration-from-v6.md) and v7→v8 (guide/migration.md) - New Blog Post: Adds announcement post for Vite 8 Beta explaining the Rolldown integration and performance improvements
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| releases.md | Removes outdated esbuild version management section |
| public/_redirects | Adds redirects for rolldown guide to v7 documentation |
| plugins/index.md | Updates plugin descriptions to reference Oxc and SWC instead of esbuild, adds Rolldown builtin plugins section |
| guide/troubleshooting.md | Updates configuration references from build.rollupOptions to build.rolldownOptions |
| guide/philosophy.md | Replaces esbuild/Rollup references with Oxc/Rolldown in performance section |
| guide/performance.md | Removes suggestion to use Rolldown (now default) |
| guide/migration.md | Completely rewritten for v7→v8 migration with extensive Rolldown/Oxc migration details |
| guide/migration-from-v6.md | New file documenting v6→v7 migration (moved from previous migration.md) |
| guide/index.md | Updates browser support baseline date from 2025-05-01 to 2026-01-01 |
| guide/features.md | Adds documentation for emitDecoratorMetadata and paths TypeScript options, removes alwaysStrict |
| guide/dep-pre-bundling.md | Updates dependency pre-bundling documentation to reference Rolldown instead of esbuild |
| guide/cli.md | Updates CLI option descriptions to reference Rolldown instead of esbuild |
| guide/build.md | Updates build targets, changes Rollup references to Rolldown, updates chunking strategy documentation |
| guide/api-plugin.md | Adds TODO comment for Rolldown documentation link |
| guide/api-javascript.md | Adds new transformWithOxc API function, deprecates transformWithEsbuild |
| config/worker-options.md | Adds worker.rolldownOptions, deprecates worker.rollupOptions |
| config/shared-options.md | Replaces esbuild config section with oxc, adds resolve.tsconfigPaths option |
| config/index.md | Updates config loading reference from esbuild to Rolldown |
| config/dep-optimization-options.md | Adds optimizeDeps.rolldownOptions, deprecates optimizeDeps.esbuildOptions |
| config/build-options.md | Updates build options extensively: new browser targets, Rolldown options, Oxc minification, Lightning CSS as default |
| blog/announcing-vite8-beta.md | New blog post announcing Vite 8 Beta with Rolldown integration |
| .vitepress/config.ts | Removes Rolldown guide navigation link (now part of main Vite 8) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ``` | ||
|
|
||
| 默认情况下,esbuild 会被应用在 `ts`、`jsx`、`tsx` 文件。你可以通过 `esbuild.include` 和 `esbuild.exclude` 对要处理的文件类型进行配置,这两个配置的值可以是一个正则表达式、一个 [picomatch](https://github.com/micromatch/picomatch#globbing-features) 模式,或是一个值为这两种类型的数组。 | ||
| 默认情况下,Oxc转换 会被应用在 `ts`、`jsx`、`tsx` 文件。你可以通过 `oxc.include` 和 `oxc.exclude` 对要处理的文件类型进行配置,这两个配置的值可以是一个正则表达式、一个 [picomatch](https://github.com/micromatch/picomatch#globbing-features) 模式,或是一个值为这两种类型的数组。 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase "Oxc转换" contains no space between "Oxc" and "转换". It should be "Oxc 转换" for consistency with other references in the document like "Oxc 转换器" on line 25.
| 默认情况下,Oxc转换 会被应用在 `ts`、`jsx`、`tsx` 文件。你可以通过 `oxc.include` 和 `oxc.exclude` 对要处理的文件类型进行配置,这两个配置的值可以是一个正则表达式、一个 [picomatch](https://github.com/micromatch/picomatch#globbing-features) 模式,或是一个值为这两种类型的数组。 | |
| 默认情况下,Oxc 转换 会被应用在 `ts`、`jsx`、`tsx` 文件。你可以通过 `oxc.include` 和 `oxc.exclude` 对要处理的文件类型进行配置,这两个配置的值可以是一个正则表达式、一个 [picomatch](https://github.com/micromatch/picomatch#globbing-features) 模式,或是一个值为这两种类型的数组。 |
| - **类型:** `boolean` | ||
| - **默认:** `false` | ||
|
|
||
| 启用 tsconfig 路径解析功能。[tsconfig.json](file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json) 中的 `paths` 选项将用于解析导入。更多详情请参见[功能](/guide/features.md#paths)。 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link reference contains an incorrect file path file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json. This is an absolute local file path that should not be included in documentation. It should be a relative reference like tsconfig.json without the file:// protocol and absolute path.
| 启用 tsconfig 路径解析功能。[tsconfig.json](file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json) 中的 `paths` 选项将用于解析导入。更多详情请参见[功能](/guide/features.md#paths)。 | |
| 启用 tsconfig 路径解析功能。[tsconfig.json](tsconfig.json) 中的 `paths` 选项将用于解析导入。更多详情请参见[功能](/guide/features.md#paths)。 |
| - **默认:** 客户端构建默认为`'oxc'`,SSR构建默认为 `false` | ||
|
|
||
| 设置为 `false` 可以禁用最小化混淆,或是用来指定使用哪种混淆器。默认为 [Esbuild](https://github.com/evanw/esbuild),它比 terser 快 20-40 倍,压缩率只差 1%-2%。[Benchmarks](https://github.com/privatenumber/minification-benchmarks) | ||
| 设置为 `false` 可以禁用最小化混淆,或是用来指定使用哪种混淆器。默认使用 [Oxc Minifier](https://oxc.rs/docs/guide/usage/minifier),它比 terser 快 30~90 倍,但压缩率仅差 0.5~2%。[基准测试](https://github.com/privatenumber/minification-benchmarks) |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] There's a mix of terminology used for "minification" in Chinese. The text uses both "最小化压缩" and "最小化混淆" on this line. The term "最小化混淆" (minification and obfuscation) is technically more accurate than just "最小化" (minimization), but it should be consistent with other parts of the document. Line 135 uses "最小化压缩", so consider using consistent terminology throughout.
| 设置为 `false` 可以禁用最小化混淆,或是用来指定使用哪种混淆器。默认使用 [Oxc Minifier](https://oxc.rs/docs/guide/usage/minifier),它比 terser 快 30~90 倍,但压缩率仅差 0.5~2%。[基准测试](https://github.com/privatenumber/minification-benchmarks) | |
| 设置为 `false` 可以禁用最小化压缩,或是用来指定使用哪种混淆器。默认使用 [Oxc Minifier](https://oxc.rs/docs/guide/usage/minifier),它比 terser 快 30~90 倍,但压缩率仅差 0.5~2%。[基准测试](https://github.com/privatenumber/minification-benchmarks) |
|
|
||
| - [TypeScript 文档](https://www.typescriptlang.org/tsconfig/#paths) | ||
|
|
||
| 可以指定 `resolve.tsconfigPaths: true` 来告诉 Vite 使用 [tsconfig.json](file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json) 中的 `paths` 选项来解析导入。 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link reference contains an incorrect file path file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json. This is an absolute local file path that should not be included in documentation. It should be a relative path or reference like tsconfig.json without the file:// protocol and absolute path.
| 可以指定 `resolve.tsconfigPaths: true` 来告诉 Vite 使用 [tsconfig.json](file:///Users/liuxin/Project/开源/vite-docs-cn/tsconfig.json) 中的 `paths` 选项来解析导入。 | |
| 可以指定 `resolve.tsconfigPaths: true` 来告诉 Vite 使用 [tsconfig.json](tsconfig.json) 中的 `paths` 选项来解析导入。 |
| ## worker.rollupOptions | ||
|
|
||
| - **类型:** `RolldownOptions` | ||
| - **已弃用** | ||
|
|
||
| 此选项是 `worker.rolldownOptions` 选项的别名。请使用 `build.rolldownOptions` 选项代替。 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section heading ## worker.rollupOptions on line 27 is a duplicate of the heading on line 19. According to the pattern used elsewhere in the documentation for deprecated options, this second section should have a different approach. Either:
- Merge the deprecation notice with the first section, or
- Remove this duplicate entirely since the deprecation is already noted in the first section via the alias explanation
The content suggests this is meant to document the deprecated worker.rollupOptions option (which should be worker.rolldownOptions), but having two sections with identical headings is incorrect.
| ## worker.rollupOptions | |
| - **类型:** `RolldownOptions` | |
| - **已弃用** | |
| 此选项是 `worker.rolldownOptions` 选项的别名。请使用 `build.rolldownOptions` 选项代替。 | |
| > ⚠️ **已弃用**:此选项是 `worker.rolldownOptions` 选项的别名。请使用 `build.rolldownOptions` 选项代替。 |
| ### [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react) {#vitejs-plugin-react} | ||
|
|
||
| 使用 esbuild 和 Babel,以较小的软件包占用空间和使用 Babel 转换管道的灵活性实现快速 HMR。如果没有额外的 Babel 插件,在构建过程中只能使用 esbuild。 | ||
| 使用 [Oxc 转换器](https://oxc.rs/docs/guide/usage/transformer) and [Babel](https://babeljs.io/),以较小的软件包占用空间和使用 Babel 转换管道的灵活性实现快速 HMR。如果没有额外的 Babel 插件,在构建过程中只能使用 Oxc 转换器 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing period at the end of the sentence. The line ends with "转换器" but should end with "转换器。" to be consistent with the previous line which ends with a period.
| 使用 [Oxc 转换器](https://oxc.rs/docs/guide/usage/transformer) and [Babel](https://babeljs.io/),以较小的软件包占用空间和使用 Babel 转换管道的灵活性实现快速 HMR。如果没有额外的 Babel 插件,在构建过程中只能使用 Oxc 转换器 | |
| 使用 [Oxc 转换器](https://oxc.rs/docs/guide/usage/transformer) and [Babel](https://babeljs.io/),以较小的软件包占用空间和使用 Babel 转换管道的灵活性实现快速 HMR。如果没有额外的 Babel 插件,在构建过程中只能使用 Oxc 转换器。 |
No description provided.