Skip to content

Commit a2b08f9

Browse files
committed
docs: vite升级相关,及一些特殊说明
1 parent 9c3f063 commit a2b08f9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575

7676
## 使用说明
7777

78+
> 简要说明:
79+
>
80+
> 随着vite3.x的发布,本项目针对该依赖的相关生态做了升级,详情见分支 [feat-vite3.x](https://github.com/JS-banana/vite-vue3-ts/tree/feat-vite3.x)
81+
>
82+
> 需要指出的是vite3.x要求node14.18及以上,详情见 [从 v2 迁移](https://cn.vitejs.dev/guide/migration.html)
83+
7884
1. 克隆本项目
7985

8086
```sh
@@ -172,6 +178,12 @@ const refresh = () => ELRef.value?.refresh();
172178
// const run = (args) => ELRef.value.run(args);
173179
```
174180
181+
### 特别说明
182+
183+
`config/vite/plugin/mock.ts` 中的 `configMockPlugin` 方法,属性`prodEnabled` 在生产环境一定要关闭,不然会把大量的mock代码,如fakerjs中的一些源码打包进构建包内。
184+
185+
**本项目这里为了做演示,是手动开启了的,为了能在线上部署的时候查看mock数据,实际开发中一定注意关闭!!!**
186+
175187
## 效果图
176188
177189
![vite-vue3-3](https://cdn.jsdelivr.net/gh/JS-banana/images/vuepress/vite-vue3-3.jpg)
@@ -199,6 +211,10 @@ const refresh = () => ELRef.value?.refresh();
199211
- ✔新增`fakerjs`数据mock,配合`Mockjs`完善并增强对不同数据类型和场景的模拟
200212
- ✔完善文档,新增使用说明
201213
- [PR](https://github.com/JS-banana/vite-vue3-ts/pull/6)
214+
- 2022.07.30
215+
- vite相关工具链升级到3.x
216+
- 现在你必须使用 Node 14.18+ / 16+ 版本。
217+
- 详情见分支 [feat-vite3.x](https://github.com/JS-banana/vite-vue3-ts/tree/feat-vite3.x)
202218
203219
## 计划
204220

0 commit comments

Comments
 (0)