添加自定义 icon

This commit is contained in:
GGJ
2024-04-07 13:43:30 +08:00
parent a43dd0f62f
commit 266da2405f
198 changed files with 298 additions and 68 deletions

View File

@@ -1,12 +1,14 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import { svgBuilder } from '/@/components/icon/svg/index'
import path from 'path'
const nodeResolve = (dir: string) => path.resolve(__dirname, '.', dir)
const nodeResolve = (dir: string): any => path.resolve(__dirname, '.', dir)
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), vueJsx()],
plugins: [vue(), svgBuilder('./src/assets/icons/'), vueJsx()],
server: {
host: '0.0.0.0',
proxy: {
@@ -19,16 +21,17 @@ export default defineConfig({
'/map': {
target: 'http://192.168.1.125:8088', //数据中心
changeOrigin: true
},
'/hzj': {
target: 'http://13764779092.gnway.cc', //数据中心
changeOrigin: true,
rewrite: path => path.replace(/^\/hzj/, '') //路径重写,把'/api'替换为''
}
// '/hzj': {
// target: 'http://13764779092.gnway.cc', //数据中心
// changeOrigin: true,
// rewrite: path => path.replace(/^\/hzj/, '') //路径重写,把'/api'替换为''
// }
}
},
resolve: {
alias: {
'/@': nodeResolve('.src'),
'@': nodeResolve('src'),
'~': nodeResolve('public')
}