Skip to content

Commit d9ebaa8

Browse files
committed
docs(en): merging all conflicts
2 parents 89a330d + 2075f31 commit d9ebaa8

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

guide/api-environment-frameworks.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ app.use('*', async (req, res, next) => {
103103
})
104104
```
105105
106+
When using environments that support HMR (such as `RunnableDevEnvironment`), you should add `import.meta.hot.accept()` in your server entry file for optimal behavior. Without this, server file changes will invalidate the entire server module graph:
107+
108+
```js
109+
// src/entry-server.js
110+
export function render(...) { ... }
111+
112+
if (import.meta.hot) {
113+
import.meta.hot.accept()
114+
}
115+
```
116+
106117
### `FetchableDevEnvironment`
107118
108119
:::info

guide/features.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ Vite 启动模板默认情况下会设置 `"skipLibCheck": "true"`,以避免
113113

114114
### 客户端类型 {#client-types}
115115

116+
<<<<<<< HEAD
116117
Vite 默认的类型定义是写给它的 Node.js API 的。要将其补充到一个 Vite 应用的客户端代码环境中,请添加一个 `d.ts` 声明文件:
118+
=======
119+
Vite's default types are for its Node.js API. To shim the environment of client-side code in a Vite application, add a `d.ts` declaration file:
120+
>>>>>>> 2075f317a396ad11714f57d2c754477c26a9d3f9
117121
118122
```typescript
119123
/// <reference types="vite/client" />

0 commit comments

Comments
 (0)