Skip to content

Commit 0fb71b9

Browse files
committed
docs(cn): resolve conflicts
1 parent 706afec commit 0fb71b9

File tree

5 files changed

+9
-40
lines changed

5 files changed

+9
-40
lines changed

.vitepress/theme/index.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ import './styles/vars.css'
77
import './styles/landing.css'
88
import AsideSponsors from './components/AsideSponsors.vue'
99
import SvgImage from './components/SvgImage.vue'
10-
<<<<<<< HEAD
1110
import WwAds from './components/WwAds.vue'
1211
import ReleaseTag from './components/ReleaseTag.vue'
1312
import './custom.css'
14-
=======
1513
import YouTubeVideo from './components/YouTubeVideo.vue'
16-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
1714
import 'virtual:group-icons.css'
1815

1916
export default {
@@ -26,11 +23,8 @@ export default {
2623
},
2724
enhanceApp({ app }) {
2825
app.component('SvgImage', SvgImage)
29-
<<<<<<< HEAD
3026
app.component('ReleaseTag', ReleaseTag)
31-
=======
3227
app.component('YouTubeVideo', YouTubeVideo)
33-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
3428
app.use(TwoslashFloatingVue)
3529
},
3630
} satisfies Theme

changes/ssr-using-modulerunner.md

+4-21
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,18 @@
44
可以在 [环境 API 讨论](https://github.com/vitejs/vite/discussions/16358) 中向我们提供反馈
55
:::
66

7-
<<<<<<< HEAD
8-
`server.ssrLoadModule` 已经被 [Module Runner](/guide/api-environment#modulerunner) 取代。
9-
=======
10-
`server.ssrLoadModule` has been replaced by importing from a [Module Runner](/guide/api-environment#modulerunner).
11-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
7+
`server.ssrLoadModule` 已被从 [Module Runner](/guide/api-environment#modulerunner) 导入所取代。
128

139
影响范围:`Vite 插件作者`
1410

15-
<<<<<<< HEAD
1611
::: warning 即将废弃
17-
`ModuleRunner` 最初在 `v6.0` 版本中被引入。我们计划在未来的主要版本中废弃 `server.ssrLoadModule`。如果想识别你的使用情况,可以在你的 vite 配置文件中将 `future.removeSrLoadModule` 设置为 `"warn"`
18-
=======
19-
::: warning Future Deprecation
20-
`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.
21-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
12+
`ModuleRunner` 最初在 `v6.0` 版本中被引入。我们计划在未来的主要版本中废弃 `server.ssrLoadModule`。如果想识别你的使用情况,可以在你的 vite 配置文件中将 `future.removeSsrLoadModule` 设置为 `"warn"`
2213
:::
2314

2415
## 动机 {#motivation}
2516

26-
<<<<<<< HEAD
27-
// TODO: (保持原文)
28-
=======
29-
The `server.ssrLoadModule(url)` only allows importing modules in the `ssr` environment and can only execute the modules in the same process as the Vite dev server. For apps with custom environments, each is associated with a `ModuleRunner` that may be running in a separate thread or process. To import modules, we now have `moduleRunner.import(url)`.
30-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
17+
`server.ssrLoadModule(url)` 仅允许在 `ssr` 环境中导入模块,并且只能在与 Vite 开发服务器相同的进程中执行这些模块。对于具有自定义环境的应用程序,每个环境都关联一个 `ModuleRunner`,该模块可能在单独的线程或进程中运行。为了导入模块,我们现在使用 `moduleRunner.import(url)`
3118

3219
## 迁移指南 {#migration-guide}
3320

34-
<<<<<<< HEAD
35-
// TODO: (保持原文)
36-
=======
37-
Check out the [Environment API for Frameworks Guide](../guide/api-environment-frameworks.md).
38-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
21+
请查看 [用于框架的环境 API 指南](../guide/api-environment-frameworks.md)

guide/api-environment-instances.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ class DevEnvironment {
8585
}
8686
```
8787

88-
<<<<<<< HEAD
89-
其中 `TransformResult` 是:
90-
=======
91-
With `DevEnvironmentContext` being:
88+
其中 `DevEnvironmentContext`是:
9289

9390
```ts
9491
interface DevEnvironmentContext {
@@ -102,8 +99,7 @@ interface DevEnvironmentContext {
10299
}
103100
```
104101

105-
and with `TransformResult` being:
106-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
102+
`TransformResult` 是:
107103

108104
```ts
109105
interface TransformResult {

guide/api-environment-runtimes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ import type { Debug } from '@type-challenges/utils'
175175

176176
type InterceptorOptions = Debug<InterceptorOptionsRaw>
177177
type ModuleRunnerHmr = Debug<ModuleRunnerHmrRaw>
178-
/** see below */
178+
/** 见下文 */
179179
type ModuleRunnerTransport = unknown
180180

181181
// ---cut---
@@ -258,7 +258,7 @@ Vite 默认导出了实现此接口的 `ESModulesEvaluator`。它使用 `new Asy
258258

259259
```ts twoslash
260260
import type { ModuleRunnerTransportHandlers } from 'vite/module-runner'
261-
/** an object */
261+
/** 一个对象 */
262262
type HotPayload = unknown
263263
// ---cut---
264264
interface ModuleRunnerTransport {

guide/performance.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ Vite 的内部和官方插件已经优化,以在提供与更广泛的生态系
5252
如果你是插件作者,请确保只在需要时调用 [`this.resolve`](https://rollupjs.org/plugin-development/#this-resolve) 以减少上述检查的次数。
5353

5454
::: tip TypeScript
55-
<<<<<<< HEAD
56-
如果你正在使用 TypeScript,启用 `tsconfig.json` 中的 `compilerOptions``"moduleResolution": "Bundler"``"allowImportingTsExtensions": true` 以直接在代码中使用 `.ts``.tsx` 扩展名。
57-
=======
58-
If you are using TypeScript, enable `"moduleResolution": "bundler"` and `"allowImportingTsExtensions": true` in your `tsconfig.json`'s `compilerOptions` to use `.ts` and `.tsx` extensions directly in your code.
59-
>>>>>>> db0517b83d2535549c9c929b32afa3ae005d20ed
55+
如果你正在使用 TypeScript,启用 `tsconfig.json` 中的 `compilerOptions``"moduleResolution": "bundler"``"allowImportingTsExtensions": true` 以直接在代码中使用 `.ts``.tsx` 扩展名。
6056
:::
6157

6258
## 避免使用桶文件 {#avoid-barrel-files}

0 commit comments

Comments
 (0)