fix: build

This commit is contained in:
xingyu 2022-12-06 00:29:17 +08:00
parent e255d512cd
commit 039f4a0d11
4 changed files with 94 additions and 17 deletions

View File

@ -67,7 +67,7 @@ export function createVitePlugins(VITE_APP_TITLE: string) {
threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b
algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw'] algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
ext: '.gz', // 生成的压缩包后缀 ext: '.gz', // 生成的压缩包后缀
deleteOriginFile: true //压缩后是否删除源文件 deleteOriginFile: false //压缩后是否删除源文件
}), }),
ViteEjsPlugin({ ViteEjsPlugin({
title: VITE_APP_TITLE title: VITE_APP_TITLE

View File

@ -68,9 +68,11 @@
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0", "@typescript-eslint/parser": "^5.45.0",
"@vitejs/plugin-legacy": "^2.3.1",
"@vitejs/plugin-vue": "^3.2.0", "@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1", "@vitejs/plugin-vue-jsx": "^2.1.1",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"consola": "^2.15.3",
"eslint": "^8.29.0", "eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.12.0", "eslint-define-config": "^1.12.0",
@ -90,6 +92,7 @@
"stylelint-config-recommended": "^9.0.0", "stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^29.0.0", "stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0", "stylelint-order": "^5.0.0",
"terser": "^5.16.1",
"typescript": "4.9.3", "typescript": "4.9.3",
"vite": "3.2.5", "vite": "3.2.5",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",

View File

@ -15,6 +15,7 @@ specifiers:
'@types/qs': ^6.9.7 '@types/qs': ^6.9.7
'@typescript-eslint/eslint-plugin': ^5.45.0 '@typescript-eslint/eslint-plugin': ^5.45.0
'@typescript-eslint/parser': ^5.45.0 '@typescript-eslint/parser': ^5.45.0
'@vitejs/plugin-legacy': ^2.3.1
'@vitejs/plugin-vue': ^3.2.0 '@vitejs/plugin-vue': ^3.2.0
'@vitejs/plugin-vue-jsx': ^2.1.1 '@vitejs/plugin-vue-jsx': ^2.1.1
'@vueuse/core': ^9.6.0 '@vueuse/core': ^9.6.0
@ -24,6 +25,7 @@ specifiers:
animate.css: ^4.1.1 animate.css: ^4.1.1
autoprefixer: ^10.4.13 autoprefixer: ^10.4.13
axios: ^1.2.0 axios: ^1.2.0
consola: ^2.15.3
crypto-js: ^4.1.1 crypto-js: ^4.1.1
dayjs: ^1.11.6 dayjs: ^1.11.6
echarts: ^5.4.0 echarts: ^5.4.0
@ -56,6 +58,7 @@ specifiers:
stylelint-config-recommended: ^9.0.0 stylelint-config-recommended: ^9.0.0
stylelint-config-standard: ^29.0.0 stylelint-config-standard: ^29.0.0
stylelint-order: ^5.0.0 stylelint-order: ^5.0.0
terser: ^5.16.1
typescript: 4.9.3 typescript: 4.9.3
url: ^0.11.0 url: ^0.11.0
vite: 3.2.5 vite: 3.2.5
@ -124,9 +127,11 @@ devDependencies:
'@types/qs': 6.9.7 '@types/qs': 6.9.7
'@typescript-eslint/eslint-plugin': 5.45.0_yjegg5cyoezm3fzsmuszzhetym '@typescript-eslint/eslint-plugin': 5.45.0_yjegg5cyoezm3fzsmuszzhetym
'@typescript-eslint/parser': 5.45.0_s5ps7njkmjlaqajutnox5ntcla '@typescript-eslint/parser': 5.45.0_s5ps7njkmjlaqajutnox5ntcla
'@vitejs/plugin-legacy': 2.3.1_terser@5.16.1+vite@3.2.5
'@vitejs/plugin-vue': 3.2.0_vite@3.2.5+vue@3.2.45 '@vitejs/plugin-vue': 3.2.0_vite@3.2.5+vue@3.2.45
'@vitejs/plugin-vue-jsx': 2.1.1_vite@3.2.5+vue@3.2.45 '@vitejs/plugin-vue-jsx': 2.1.1_vite@3.2.5+vue@3.2.45
autoprefixer: 10.4.13_postcss@8.4.19 autoprefixer: 10.4.13_postcss@8.4.19
consola: 2.15.3
eslint: 8.29.0 eslint: 8.29.0
eslint-config-prettier: 8.5.0_eslint@8.29.0 eslint-config-prettier: 8.5.0_eslint@8.29.0
eslint-define-config: 1.12.0 eslint-define-config: 1.12.0
@ -146,8 +151,9 @@ devDependencies:
stylelint-config-recommended: 9.0.0_stylelint@14.16.0 stylelint-config-recommended: 9.0.0_stylelint@14.16.0
stylelint-config-standard: 29.0.0_stylelint@14.16.0 stylelint-config-standard: 29.0.0_stylelint@14.16.0
stylelint-order: 5.0.0_stylelint@14.16.0 stylelint-order: 5.0.0_stylelint@14.16.0
terser: 5.16.1
typescript: 4.9.3 typescript: 4.9.3
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
vite-plugin-compression: 0.5.1_vite@3.2.5 vite-plugin-compression: 0.5.1_vite@3.2.5
vite-plugin-ejs: 1.6.4 vite-plugin-ejs: 1.6.4
vite-plugin-eslint: 1.8.1_eslint@8.29.0+vite@3.2.5 vite-plugin-eslint: 1.8.1_eslint@8.29.0+vite@3.2.5
@ -426,6 +432,11 @@ packages:
regenerator-runtime: 0.13.11 regenerator-runtime: 0.13.11
dev: false dev: false
/@babel/standalone/7.20.6:
resolution: {integrity: sha512-u5at/CbBLETf7kx2LOY4XdhseD79Y099WZKAOMXeT8qvd9OSR515my2UNBBLY4qIht/Qi9KySeQHQwQwxJN4Sw==}
engines: {node: '>=6.9.0'}
dev: true
/@babel/template/7.18.10: /@babel/template/7.18.10:
resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -828,7 +839,7 @@ packages:
debug: 4.3.4 debug: 4.3.4
fast-glob: 3.2.12 fast-glob: 3.2.12
source-map: 0.6.1 source-map: 0.6.1
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
vue-i18n: 9.2.2_vue@3.2.45 vue-i18n: 9.2.2_vue@3.2.45
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -868,6 +879,13 @@ packages:
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
dev: true dev: true
/@jridgewell/source-map/0.3.2:
resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==}
dependencies:
'@jridgewell/gen-mapping': 0.3.2
'@jridgewell/trace-mapping': 0.3.17
dev: true
/@jridgewell/sourcemap-codec/1.4.14: /@jridgewell/sourcemap-codec/1.4.14:
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
dev: true dev: true
@ -1216,6 +1234,22 @@ packages:
nanoid: 3.3.4 nanoid: 3.3.4
dev: false dev: false
/@vitejs/plugin-legacy/2.3.1_terser@5.16.1+vite@3.2.5:
resolution: {integrity: sha512-J5KaGBlSt2tEYPVjM/C8dA6DkRzkFkbPe+Xb4IX5G+XOV5OGbVAfkMjKywdrkO3gGynO8S98i71Lmsff4cWkCQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
terser: ^5.4.0
vite: ^3.0.0
dependencies:
'@babel/standalone': 7.20.6
core-js: 3.26.1
magic-string: 0.26.7
regenerator-runtime: 0.13.11
systemjs: 6.13.0
terser: 5.16.1
vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
dev: true
/@vitejs/plugin-vue-jsx/2.1.1_vite@3.2.5+vue@3.2.45: /@vitejs/plugin-vue-jsx/2.1.1_vite@3.2.5+vue@3.2.45:
resolution: {integrity: sha512-JgDhxstQlwnHBvZ1BSnU5mbmyQ14/t5JhREc6YH5kWyu2QdAAOsLF6xgHoIWarj8tddaiwFrNzLbWJPudpXKYA==} resolution: {integrity: sha512-JgDhxstQlwnHBvZ1BSnU5mbmyQ14/t5JhREc6YH5kWyu2QdAAOsLF6xgHoIWarj8tddaiwFrNzLbWJPudpXKYA==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
@ -1226,7 +1260,7 @@ packages:
'@babel/core': 7.20.2 '@babel/core': 7.20.2
'@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2 '@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2
'@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.2 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.2
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
vue: 3.2.45 vue: 3.2.45
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -1239,7 +1273,7 @@ packages:
vite: ^3.0.0 vite: ^3.0.0
vue: ^3.2.25 vue: ^3.2.25
dependencies: dependencies:
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
vue: 3.2.45 vue: 3.2.45
dev: true dev: true
@ -1933,6 +1967,10 @@ packages:
update-browserslist-db: 1.0.10_browserslist@4.21.4 update-browserslist-db: 1.0.10_browserslist@4.21.4
dev: true dev: true
/buffer-from/1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
dev: true
/cache-base/1.0.1: /cache-base/1.0.1:
resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@ -2159,6 +2197,10 @@ packages:
delayed-stream: 1.0.0 delayed-stream: 1.0.0
dev: false dev: false
/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: true
/commander/7.2.0: /commander/7.2.0:
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
@ -2188,6 +2230,10 @@ packages:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true dev: true
/consola/2.15.3:
resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==}
dev: true
/console/0.7.2: /console/0.7.2:
resolution: {integrity: sha512-+JSDwGunA4MTEgAV/4VBKwUHonP8CzJ/6GIuwPi6acKFqFfHUdSGCm89ZxZ5FfGWdZfkdgAroy5bJ5FSeN/t4g==} resolution: {integrity: sha512-+JSDwGunA4MTEgAV/4VBKwUHonP8CzJ/6GIuwPi6acKFqFfHUdSGCm89ZxZ5FfGWdZfkdgAroy5bJ5FSeN/t4g==}
dev: true dev: true
@ -2239,6 +2285,11 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/core-js/3.26.1:
resolution: {integrity: sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA==}
requiresBuild: true
dev: true
/cors/2.8.5: /cors/2.8.5:
resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
engines: {node: '>= 0.10'} engines: {node: '>= 0.10'}
@ -5000,7 +5051,6 @@ packages:
/regenerator-runtime/0.13.11: /regenerator-runtime/0.13.11:
resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==}
dev: false
/regex-not/1.0.2: /regex-not/1.0.2:
resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==}
@ -5342,6 +5392,13 @@ packages:
urix: 0.1.0 urix: 0.1.0
dev: true dev: true
/source-map-support/0.5.21:
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
dependencies:
buffer-from: 1.1.2
source-map: 0.6.1
dev: true
/source-map-url/0.4.1: /source-map-url/0.4.1:
resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==}
deprecated: See https://github.com/lydell/source-map-url#deprecated deprecated: See https://github.com/lydell/source-map-url#deprecated
@ -5358,6 +5415,7 @@ packages:
/sourcemap-codec/1.4.8: /sourcemap-codec/1.4.8:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
deprecated: Please use @jridgewell/sourcemap-codec instead
/spdx-correct/3.1.1: /spdx-correct/3.1.1:
resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==}
@ -5662,6 +5720,10 @@ packages:
stable: 0.1.8 stable: 0.1.8
dev: true dev: true
/systemjs/6.13.0:
resolution: {integrity: sha512-P3cgh2bpaPvAO2NE3uRp/n6hmk4xPX4DQf+UzTlCAycssKdqhp6hjw+ENWe+aUS7TogKRFtptMosTSFeC6R55g==}
dev: true
/table/6.8.1: /table/6.8.1:
resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==}
engines: {node: '>=10.0.0'} engines: {node: '>=10.0.0'}
@ -5673,6 +5735,17 @@ packages:
strip-ansi: 6.0.1 strip-ansi: 6.0.1
dev: true dev: true
/terser/5.16.1:
resolution: {integrity: sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==}
engines: {node: '>=10'}
hasBin: true
dependencies:
'@jridgewell/source-map': 0.3.2
acorn: 8.8.1
commander: 2.20.3
source-map-support: 0.5.21
dev: true
/text-extensions/1.9.0: /text-extensions/1.9.0:
resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==}
engines: {node: '>=0.10'} engines: {node: '>=0.10'}
@ -5944,7 +6017,7 @@ packages:
chalk: 4.1.2 chalk: 4.1.2
debug: 4.3.4 debug: 4.3.4
fs-extra: 10.1.0 fs-extra: 10.1.0
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
@ -5965,7 +6038,7 @@ packages:
'@types/eslint': 8.4.10 '@types/eslint': 8.4.10
eslint: 8.29.0 eslint: 8.29.0
rollup: 2.79.1 rollup: 2.79.1
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
dev: true dev: true
/vite-plugin-progress/0.0.6_vite@3.2.5: /vite-plugin-progress/0.0.6_vite@3.2.5:
@ -5977,7 +6050,7 @@ packages:
picocolors: 1.0.0 picocolors: 1.0.0
progress: 2.0.3 progress: 2.0.3
rd: 2.0.1 rd: 2.0.1
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
dev: true dev: true
/vite-plugin-purge-icons/0.9.1_vite@3.2.5: /vite-plugin-purge-icons/0.9.1_vite@3.2.5:
@ -5989,7 +6062,7 @@ packages:
'@purge-icons/core': 0.9.1 '@purge-icons/core': 0.9.1
'@purge-icons/generated': 0.9.0 '@purge-icons/generated': 0.9.0
rollup-plugin-purge-icons: 0.9.1 rollup-plugin-purge-icons: 0.9.1
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
- supports-color - supports-color
@ -6007,7 +6080,7 @@ packages:
fs-extra: 10.1.0 fs-extra: 10.1.0
magic-string: 0.25.9 magic-string: 0.25.9
pathe: 0.2.0 pathe: 0.2.0
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
dev: true dev: true
/vite-plugin-svg-icons/2.0.1_vite@3.2.5: /vite-plugin-svg-icons/2.0.1_vite@3.2.5:
@ -6023,7 +6096,7 @@ packages:
pathe: 0.2.0 pathe: 0.2.0
svg-baker: 1.7.0 svg-baker: 1.7.0
svgo: 2.8.0 svgo: 2.8.0
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
@ -6035,7 +6108,7 @@ packages:
dependencies: dependencies:
'@vue/compiler-sfc': 3.2.45 '@vue/compiler-sfc': 3.2.45
magic-string: 0.25.9 magic-string: 0.25.9
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
dev: true dev: true
/vite-plugin-windicss/1.8.8_vite@3.2.5: /vite-plugin-windicss/1.8.8_vite@3.2.5:
@ -6046,13 +6119,13 @@ packages:
'@windicss/plugin-utils': 1.8.8 '@windicss/plugin-utils': 1.8.8
debug: 4.3.4 debug: 4.3.4
kolorist: 1.6.0 kolorist: 1.6.0
vite: 3.2.5_clvymlzunojxjbv3h6i2warera vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia
windicss: 3.5.6 windicss: 3.5.6
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/vite/3.2.5_clvymlzunojxjbv3h6i2warera: /vite/3.2.5_hkozoy3rp4unz5ikgaby45vsia:
resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==} resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true hasBin: true
@ -6083,6 +6156,7 @@ packages:
resolve: 1.22.1 resolve: 1.22.1
rollup: 2.79.1 rollup: 2.79.1
sass: 1.56.1 sass: 1.56.1
terser: 5.16.1
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true

View File

@ -33,11 +33,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
open: env.VITE_OPEN, open: env.VITE_OPEN,
// 本地跨域代理 // 本地跨域代理
proxy: { proxy: {
['/dev-api']: { ['/admin-api']: {
target: env.VITE_BASE_URL, target: env.VITE_BASE_URL,
ws: false, ws: false,
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(new RegExp(`^/dev-api`), ''), rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
}, },
}, },
}, },