Skip to content

Commit a525f86

Browse files
committed
perf: Update plugins
1 parent d08d6b5 commit a525f86

File tree

9 files changed

+7820
-8257
lines changed

9 files changed

+7820
-8257
lines changed

build/vite/plugin/components.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Components from 'unplugin-vue-components/vite'
2+
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
3+
4+
export function configAntdComponentsPlugin() {
5+
return Components({
6+
resolvers: [
7+
AntDesignVueResolver({
8+
importStyle: false
9+
})
10+
]
11+
})
12+
}

build/vite/plugin/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
44
// import { codeInspectorPlugin } from 'code-inspector-plugin'
55
import { configMockPlugin } from './mock'
66
import { configSvgIconsPlugin } from './svgIcons'
7-
import { configStyleImportPlugin } from './styles'
7+
import { configAntdComponentsPlugin } from './components'
88

99
export function createVitePlugins(isBuild: boolean) {
1010
const vitePlugins: (Plugin | Plugin[])[] = [
@@ -13,8 +13,8 @@ export function createVitePlugins(isBuild: boolean) {
1313
vueJsx()
1414
]
1515

16-
// vite-plugin-style-import
17-
vitePlugins.push(configStyleImportPlugin())
16+
// unplugin-vue-components
17+
vitePlugins.push(configAntdComponentsPlugin())
1818

1919
// vite-plugin-svg-icons
2020
vitePlugins.push(configSvgIconsPlugin(isBuild))

build/vite/plugin/styles.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

components.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
// Generated by unplugin-vue-components
4+
// Read more: https://github.com/vuejs/core/pull/3399
5+
export {}
6+
7+
/* prettier-ignore */
8+
declare module 'vue' {
9+
export interface GlobalComponents {
10+
RouterLink: typeof import('vue-router')['RouterLink']
11+
RouterView: typeof import('vue-router')['RouterView']
12+
}
13+
}

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"commit": "git-cz"
2020
},
2121
"dependencies": {
22-
"@ant-design/colors": "^7.0.2",
22+
"@ant-design/colors": "^7.1.0",
2323
"@ant-design/icons-vue": "^7.0.1",
2424
"@emotion/css": "^11.11.2",
2525
"@form-create/designer": "^3.1.5",
@@ -29,7 +29,7 @@
2929
"@vueuse/core": "^10.7.1",
3030
"@wangeditor/editor": "^5.1.23",
3131
"@wangeditor/editor-for-vue": "^5.1.12",
32-
"ant-design-vue": "^4.1.0",
32+
"ant-design-vue": "^4.2.5",
3333
"axios": "^1.6.5",
3434
"codemirror": "^6.0.1",
3535
"crypto-js": "^4.2.0",
@@ -92,11 +92,12 @@
9292
"postcss": "^8.4.33",
9393
"postcss-load-config": "^5.0.2",
9494
"prettier": "^3.1.1",
95-
"rimraf": "^5.0.5",
95+
"rimraf": "^6.0.1",
9696
"rollup": "^4.9.4",
9797
"terser": "^5.26.0",
9898
"typescript": "^5.3.3",
99-
"vite": "^5.0.11",
99+
"unplugin-vue-components": "^0.27.4",
100+
"vite": "^5.4.10",
100101
"vite-plugin-mock": "2.9.8",
101102
"vite-plugin-style-import": "^2.0.0",
102103
"vite-plugin-svg-icons": "^2.0.1",

0 commit comments

Comments
 (0)