Skip to content

Commit b3a376f

Browse files
Merge pull request #631 from waynzh/guide/feature
docs(cn): resolve all conflicts
2 parents d813702 + 70000fa commit b3a376f

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

config/build-options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import 'vite/modulepreload-polyfill'
3434

3535
每个动态导入要预加载的块列表将由 Vite 计算。默认情况下,在载入这些依赖时,会使用一个包含 `base` 的绝对路径。如果 `base` 是相对路径(`''` 或者 './'),解析时则会使用 `import.meta.url`,以避免出现依赖于最终部署基路径的绝对路径。
3636

37-
目前有一个实验性功能支持使用 `resolveDependencies` 函数对依赖项列表及其路径进行细粒度控制。它期望接收一个 `resolvemodulepreloaddependciesfn` 类型的函数:
37+
目前有一个实验性功能支持使用 `resolveDependencies` 函数对依赖项列表及其路径进行细粒度控制。它期望接收一个 `ResolveModulePreloadDependenciesFn` 类型的函数:
3838

3939
```ts
4040
type ResolveModulePreloadDependenciesFn = (

guide/api-javascript.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,12 @@ interface ViteDevServer {
118118
*/
119119
ssrFixStacktrace(e: Error): void
120120
/**
121-
<<<<<<< HEAD
122-
* 启动服务器
123-
=======
124-
* Triggers HMR for a module in the module graph. You can use the `server.moduleGraph`
125-
* API to retrieve the module to be reloaded. If `hmr` is false, this is a no-op.
121+
* 触发模块图中某个模块的 HMR。你可以使用 `server.moduleGraph`
122+
* API 来检索要重新加载的模块。如果 `hmr``false`,则不进行任何操作
126123
*/
127124
reloadModule(module: ModuleNode): Promise<void>
128125
/**
129-
* Start the server.
130-
>>>>>>> 1f2ed17628ee97a603daa38075df1044a3d44354
126+
* 启动服务器
131127
*/
132128
listen(port?: number, isRestart?: boolean): Promise<ViteDevServer>
133129
/**

guide/features.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ export type { T }
5757

5858
#### `useDefineForClassFields`
5959

60-
<<<<<<< HEAD
61-
从 Vite v2.5.0 开始,如果 TypeScript 的 target 是 `ESNext`,此选项默认值则为 `true`。这与 [`tsc` v4.3.2 及以后版本的行为](https://github.com/microsoft/TypeScript/pull/42663) 一致。这也是标准的 ECMAScript 的运行时行为。
62-
=======
63-
Starting from Vite 2.5.0, the default value will be `true` if the TypeScript target is `ES2022` or higher including `ESNext`. It is consistent with the [behavior of `tsc` 4.3.2 and later](https://github.com/microsoft/TypeScript/pull/42663). It is also the standard ECMAScript runtime behavior.
64-
>>>>>>> 1f2ed17628ee97a603daa38075df1044a3d44354
60+
从 Vite v2.5.0 开始,如果 TypeScript 的 target 是 `ES2022` 或更高,包括 `ESNext`,则此选项默认值为 `true`。这与 [`tsc` v4.3.2 及以后版本的行为](https://github.com/microsoft/TypeScript/pull/42663) 一致。这也是标准的 ECMAScript 的运行时行为。
6561

6662
但对于那些习惯其他编程语言或旧版本 TypeScript 的开发者来说,这可能是违反直觉的。
6763
你可以参阅 [TypeScript 3.7 发布日志](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier) 中了解更多关于如何兼容的信息。

0 commit comments

Comments
 (0)