Skip to content

Commit 85c0d74

Browse files
authored
docs(en): merge docs-cn/sync-docs into docs-cn/dev @ d5d2157
2 parents 8c310b9 + e194df3 commit 85c0d74

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

config/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export default defineConfig(async ({ command, mode }) => {
483483

484484
当需要再 Windows Subsystem for Linux (WSL) 2 上运行 Vite 时,如果项目文件夹位于 Windows 文件系统中,你需要将此选项设置为 `{ usePolling: true }`。这是由于 Windows 文件系统的 [WSL2 限制](https://github.com/microsoft/WSL/issues/4739) 造成的。
485485

486-
Vite 服务器默认会忽略对 `.git/``node_modules/` 目录的监听。如果你需要对 `node_moduels/` 内的包进行监听,你可以为 `server.watch.ignored` 赋值一个取反的 glob 模式,例如:
486+
Vite 服务器默认会忽略对 `.git/``node_modules/` 目录的监听。如果你需要对 `node_modules/` 内的包进行监听,你可以为 `server.watch.ignored` 赋值一个取反的 glob 模式,例如:
487487

488488
```js
489489
export default defineConfig({

guide/features.md

+4
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Vue 用户应使用官方提供的 [@vitejs/plugin-vue-jsx](https://github.com/v
108108

109109
```js
110110
// vite.config.js
111+
import { defineConfig } from 'vite'
112+
111113
export default defineConfig({
112114
esbuild: {
113115
jsxFactory: 'h',
@@ -122,6 +124,8 @@ export default defineConfig({
122124

123125
```js
124126
// vite.config.js
127+
import { defineConfig } from 'vite'
128+
125129
export default defineConfig({
126130
esbuild: {
127131
jsxInject: `import React from 'react'`

guide/index.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $ yarn create vite
5656
使用 PNPM:
5757

5858
```bash
59-
$ pnpm dlx create-vite
59+
$ pnpm create vite
6060
```
6161

6262
然后按照提示操作即可!
@@ -72,6 +72,9 @@ npm init vite@latest my-vue-app -- --template vue
7272

7373
# yarn
7474
yarn create vite my-vue-app --template vue
75+
76+
# pnpm
77+
pnpm create vite my-vue-app -- --template vue
7578
```
7679

7780
查看 [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) 以获取每个模板的更多细节:`vanilla``vanilla-ts``vue``vue-ts``react``react-ts``preact``preact-ts``lit``lit-ts``svelte``svelte-ts`

0 commit comments

Comments
 (0)