File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ export default defineConfig(async ({ command, mode }) => {
483
483
484
484
当需要再 Windows Subsystem for Linux (WSL) 2 上运行 Vite 时,如果项目文件夹位于 Windows 文件系统中,你需要将此选项设置为 ` { usePolling: true } ` 。这是由于 Windows 文件系统的 [ WSL2 限制] ( https://github.com/microsoft/WSL/issues/4739 ) 造成的。
485
485
486
- Vite 服务器默认会忽略对 ` .git/ ` 和 ` node_modules/ ` 目录的监听。如果你需要对 ` node_moduels /` 内的包进行监听,你可以为 ` server.watch.ignored ` 赋值一个取反的 glob 模式,例如:
486
+ Vite 服务器默认会忽略对 ` .git/ ` 和 ` node_modules/ ` 目录的监听。如果你需要对 ` node_modules /` 内的包进行监听,你可以为 ` server.watch.ignored ` 赋值一个取反的 glob 模式,例如:
487
487
488
488
``` js
489
489
export default defineConfig ({
Original file line number Diff line number Diff line change @@ -108,6 +108,8 @@ Vue 用户应使用官方提供的 [@vitejs/plugin-vue-jsx](https://github.com/v
108
108
109
109
``` js
110
110
// vite.config.js
111
+ import { defineConfig } from ' vite'
112
+
111
113
export default defineConfig ({
112
114
esbuild: {
113
115
jsxFactory: ' h' ,
@@ -122,6 +124,8 @@ export default defineConfig({
122
124
123
125
``` js
124
126
// vite.config.js
127
+ import { defineConfig } from ' vite'
128
+
125
129
export default defineConfig ({
126
130
esbuild: {
127
131
jsxInject: ` import React from 'react'`
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ $ yarn create vite
56
56
使用 PNPM:
57
57
58
58
``` bash
59
- $ pnpm dlx create- vite
59
+ $ pnpm create vite
60
60
```
61
61
62
62
然后按照提示操作即可!
@@ -72,6 +72,9 @@ npm init vite@latest my-vue-app -- --template vue
72
72
73
73
# yarn
74
74
yarn create vite my-vue-app --template vue
75
+
76
+ # pnpm
77
+ pnpm create vite my-vue-app -- --template vue
75
78
```
76
79
77
80
查看 [ 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 ` 。
You can’t perform that action at this time.
0 commit comments