Skip to content

Commit 881b5ad

Browse files
authored
Merge pull request #7 from JS-banana/feat-vite3.x
feat: vite2.x => vite3.x 工具链生态相关升级更新
2 parents a2b08f9 + 863c333 commit 881b5ad

File tree

9 files changed

+1594
-996
lines changed

9 files changed

+1594
-996
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
相关文章:<https://juejin.cn/post/7041188884864040991>
1010

11+
本项目相关改动及更新见【[更新记录](#更新记录)↓↓↓】
12+
1113
## 特性
1214

1315
- ✨脚手架工具:高效、快速的 **Vite**
@@ -200,9 +202,11 @@ const refresh = () => ELRef.value?.refresh();
200202
- 路由模式由 hash调整为 history
201203
- 2022.05.07
202204
- 添加路由动效`transition`,优化用户体验,并抽离封装`Breadcrumb`组件
203-
- 添加权限指令`v-role`,调整权限逻辑,`Table`相关组件有所改动(配合该篇文章食用[多级别权限设计思考及实战](https://ssscode.com/pages/ff7971/))
205+
- 添加权限指令`v-role`,调整权限逻辑,目前权限指令包括`v-role`/`v-auth`
206+
- `Table`相关组件有所改动,同步迭代了一些功能点,包括优化项
207+
- 建议配合该篇文章食用[多级别权限设计思考及实战](https://ssscode.com/pages/ff7971/)
204208
- 2022.06.21
205-
- `ant-design-vue`升级到`3.x`版本
209+
- `ant-design-vue`升级到`3.x`版本,同步更新改动了一些API
206210
- `dayjs`替换`moment`
207211
- 2022.07.24
208212
- ✔完善`Table`组件,更新了一些在项目中迭代的优化
@@ -215,12 +219,14 @@ const refresh = () => ELRef.value?.refresh();
215219
- vite相关工具链升级到3.x
216220
- 现在你必须使用 Node 14.18+ / 16+ 版本。
217221
- 详情见分支 [feat-vite3.x](https://github.com/JS-banana/vite-vue3-ts/tree/feat-vite3.x)
222+
- 原有的vite2.x版本见分支 [feat-vite2.x](https://github.com/JS-banana/vite-vue3-ts/tree/feat-vite2.x)
223+
- 现在master主分支为最新的vite3.x版本
218224
219225
## 计划
220226
227+
- [x] `ant-design-vue` 升级到 3.x版本
221228
- [ ] 主题换肤功能
222229
- [ ] 引入 `tailwindcss`
223-
- [x] `ant-design-vue` 升级到 3.x版本
224230
225231
## 感谢star
226232

config/constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const MOCK_API_TARGET_URL = 'http://localhost:3000';
2424
export const ICONFONTURL = '//at.alicdn.com/t/font_3004192_9jmc1z9neiw.js'; // 去色版
2525

2626
// 包依赖分析
27-
export const ANALYSIS = false;
27+
export const ANALYSIS = true;
2828

2929
// 代码压缩
3030
export const COMPRESSION = true;

config/vite/optimizer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const vendorLibs: { match: string[]; output: string }[] = [
1414
},
1515
];
1616

17-
// @ts-ignore
17+
// pnpm安装的依赖,获取到的路径名称是拼接而成且比较长的
18+
// vite-vue3-ts/node_modules/.pnpm/[email protected][email protected]/node_modules/ant-design-vue/es/card/style/index.js
1819
export const configManualChunk = (id: string) => {
1920
if (/[\\/]node_modules[\\/]/.test(id)) {
2021
const matchItem = vendorLibs.find((item) => {

package.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,11 @@
4444
"dependencies": {
4545
"@ant-design/icons-vue": "^6.0.1",
4646
"@vueuse/core": "^6.8.0",
47-
"@vueuse/head": "^0.6.0",
4847
"ant-design-vue": "^3.2.7",
4948
"axios": "^0.24.0",
50-
"buffer": "^6.0.3",
51-
"crypto-js": "^4.1.1",
5249
"dayjs": "^1.11.3",
5350
"echarts": "^5.2.2",
5451
"lodash-es": "^4.17.21",
55-
"moment": "^2.29.1",
5652
"pinia": "^2.0.3",
5753
"sanitize.css": "^13.0.0",
5854
"vue": "^3.2.16",
@@ -66,9 +62,9 @@
6662
"@types/lodash-es": "^4.17.5",
6763
"@typescript-eslint/eslint-plugin": "^4.31.1",
6864
"@typescript-eslint/parser": "^4.31.1",
69-
"@vitejs/plugin-legacy": "^1.6.2",
70-
"@vitejs/plugin-vue": "^1.9.3",
71-
"@vitejs/plugin-vue-jsx": "^1.2.0",
65+
"@vitejs/plugin-legacy": "^2.0.0",
66+
"@vitejs/plugin-vue": "^3.0.1",
67+
"@vitejs/plugin-vue-jsx": "^2.0.0",
7268
"autoprefixer": "^10.4.0",
7369
"eslint": "^7.32.0",
7470
"eslint-config-prettier": "^8.3.0",
@@ -86,14 +82,15 @@
8682
"postcss-less": "^5.0.0",
8783
"prettier": "^2.4.1",
8884
"rimraf": "^3.0.2",
89-
"rollup-plugin-visualizer": "^5.5.2",
85+
"rollup-plugin-visualizer": "^5.7.1",
86+
"terser": "^5.14.2",
9087
"typescript": "^4.4.3",
91-
"unplugin-auto-import": "^0.4.14",
92-
"unplugin-vue-components": "^0.17.2",
93-
"vite": "^2.6.4",
88+
"unplugin-auto-import": "^0.4.20",
89+
"unplugin-vue-components": "^0.17.21",
90+
"vite": "^3.0.4",
9491
"vite-plugin-compression": "^0.3.6",
9592
"vite-plugin-mock": "^2.9.6",
96-
"vite-plugin-style-import": "^1.3.0",
93+
"vite-plugin-style-import": "^1.4.0",
9794
"vite-plugin-svg-icons": "^1.0.5",
9895
"vue-eslint-parser": "^7.11.0",
9996
"vue-tsc": "^0.3.0"

0 commit comments

Comments
 (0)