Skip to content

Commit f45cbda

Browse files
committed
docs(en): merging all conflicts
2 parents 8c310b9 + d5d2157 commit f45cbda

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

config/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,11 @@ 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+
<<<<<<< HEAD
486487
Vite 服务器默认会忽略对 `.git/``node_modules/` 目录的监听。如果你需要对 `node_moduels/` 内的包进行监听,你可以为 `server.watch.ignored` 赋值一个取反的 glob 模式,例如:
488+
=======
489+
The Vite server watcher skips `.git/` and `node_modules/` directories by default. If you want to watch a package inside `node_modules/`, you can pass a negated glob pattern to `server.watch.ignored`. That is:
490+
>>>>>>> d5d2157ac752c867656b31c22a6d79715312cc7b
487491
488492
```js
489493
export default defineConfig({
@@ -756,7 +760,11 @@ export default defineConfig({
756760
- **类型:** `boolean`
757761
- **默认:**`outDir``root` 目录下,则为 `true`
758762

763+
<<<<<<< HEAD
759764
默认情况下,若 `outDir``root` 目录下,则 Vite 会在构建时清空该目录。若 `outDir` 在根目录之外则会抛出一个警告避免意外删除掉重要的文件。可以设置该选项来关闭这个警告。该功能也可以通过命令行参数 `--emptyOutDir` 来使用。
765+
=======
766+
By default, Vite will empty the `outDir` on build if it is inside project root. It will emit a warning if `outDir` is outside of root to avoid accidentally removing important files. You can explicitly set this option to suppress the warning. This is also available via command line as `--emptyOutDir`.
767+
>>>>>>> d5d2157ac752c867656b31c22a6d79715312cc7b
760768
761769
### build.brotliSize {#build-brotlisize}
762770

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)