diff --git a/yudao-ui-admin-vue3/build/vite/index.ts b/yudao-ui-admin-vue3/build/vite/index.ts index fdf31983c..2985d5d7b 100644 --- a/yudao-ui-admin-vue3/build/vite/index.ts +++ b/yudao-ui-admin-vue3/build/vite/index.ts @@ -67,7 +67,7 @@ export function createVitePlugins(VITE_APP_TITLE: string) { threshold: 10240, // 体积大于 threshold 才会被压缩,单位 b algorithm: 'gzip', // 压缩算法,可选 [ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw'] ext: '.gz', // 生成的压缩包后缀 - deleteOriginFile: true //压缩后是否删除源文件 + deleteOriginFile: false //压缩后是否删除源文件 }), ViteEjsPlugin({ title: VITE_APP_TITLE diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index 00a34900e..12c7e7157 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -68,9 +68,11 @@ "@types/qs": "^6.9.7", "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", + "@vitejs/plugin-legacy": "^2.3.1", "@vitejs/plugin-vue": "^3.2.0", "@vitejs/plugin-vue-jsx": "^2.1.1", "autoprefixer": "^10.4.13", + "consola": "^2.15.3", "eslint": "^8.29.0", "eslint-config-prettier": "^8.5.0", "eslint-define-config": "^1.12.0", @@ -90,6 +92,7 @@ "stylelint-config-recommended": "^9.0.0", "stylelint-config-standard": "^29.0.0", "stylelint-order": "^5.0.0", + "terser": "^5.16.1", "typescript": "4.9.3", "vite": "3.2.5", "vite-plugin-compression": "^0.5.1", diff --git a/yudao-ui-admin-vue3/pnpm-lock.yaml b/yudao-ui-admin-vue3/pnpm-lock.yaml index e0184793f..d4eba00c7 100644 --- a/yudao-ui-admin-vue3/pnpm-lock.yaml +++ b/yudao-ui-admin-vue3/pnpm-lock.yaml @@ -15,6 +15,7 @@ specifiers: '@types/qs': ^6.9.7 '@typescript-eslint/eslint-plugin': ^5.45.0 '@typescript-eslint/parser': ^5.45.0 + '@vitejs/plugin-legacy': ^2.3.1 '@vitejs/plugin-vue': ^3.2.0 '@vitejs/plugin-vue-jsx': ^2.1.1 '@vueuse/core': ^9.6.0 @@ -24,6 +25,7 @@ specifiers: animate.css: ^4.1.1 autoprefixer: ^10.4.13 axios: ^1.2.0 + consola: ^2.15.3 crypto-js: ^4.1.1 dayjs: ^1.11.6 echarts: ^5.4.0 @@ -56,6 +58,7 @@ specifiers: stylelint-config-recommended: ^9.0.0 stylelint-config-standard: ^29.0.0 stylelint-order: ^5.0.0 + terser: ^5.16.1 typescript: 4.9.3 url: ^0.11.0 vite: 3.2.5 @@ -124,9 +127,11 @@ devDependencies: '@types/qs': 6.9.7 '@typescript-eslint/eslint-plugin': 5.45.0_yjegg5cyoezm3fzsmuszzhetym '@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-jsx': 2.1.1_vite@3.2.5+vue@3.2.45 autoprefixer: 10.4.13_postcss@8.4.19 + consola: 2.15.3 eslint: 8.29.0 eslint-config-prettier: 8.5.0_eslint@8.29.0 eslint-define-config: 1.12.0 @@ -146,8 +151,9 @@ devDependencies: stylelint-config-recommended: 9.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 + terser: 5.16.1 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-ejs: 1.6.4 vite-plugin-eslint: 1.8.1_eslint@8.29.0+vite@3.2.5 @@ -426,6 +432,11 @@ packages: regenerator-runtime: 0.13.11 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: resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} @@ -828,7 +839,7 @@ packages: debug: 4.3.4 fast-glob: 3.2.12 source-map: 0.6.1 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia vue-i18n: 9.2.2_vue@3.2.45 transitivePeerDependencies: - supports-color @@ -868,6 +879,13 @@ packages: engines: {node: '>=6.0.0'} 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: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true @@ -1216,6 +1234,22 @@ packages: nanoid: 3.3.4 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: resolution: {integrity: sha512-JgDhxstQlwnHBvZ1BSnU5mbmyQ14/t5JhREc6YH5kWyu2QdAAOsLF6xgHoIWarj8tddaiwFrNzLbWJPudpXKYA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -1226,7 +1260,7 @@ packages: '@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 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia vue: 3.2.45 transitivePeerDependencies: - supports-color @@ -1239,7 +1273,7 @@ packages: vite: ^3.0.0 vue: ^3.2.25 dependencies: - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia vue: 3.2.45 dev: true @@ -1933,6 +1967,10 @@ packages: update-browserslist-db: 1.0.10_browserslist@4.21.4 dev: true + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /cache-base/1.0.1: resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} engines: {node: '>=0.10.0'} @@ -2159,6 +2197,10 @@ packages: delayed-stream: 1.0.0 dev: false + /commander/2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + dev: true + /commander/7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} @@ -2188,6 +2230,10 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /consola/2.15.3: + resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + dev: true + /console/0.7.2: resolution: {integrity: sha512-+JSDwGunA4MTEgAV/4VBKwUHonP8CzJ/6GIuwPi6acKFqFfHUdSGCm89ZxZ5FfGWdZfkdgAroy5bJ5FSeN/t4g==} dev: true @@ -2239,6 +2285,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /core-js/3.26.1: + resolution: {integrity: sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA==} + requiresBuild: true + dev: true + /cors/2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} @@ -5000,7 +5051,6 @@ packages: /regenerator-runtime/0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - dev: false /regex-not/1.0.2: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} @@ -5342,6 +5392,13 @@ packages: urix: 0.1.0 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: resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} deprecated: See https://github.com/lydell/source-map-url#deprecated @@ -5358,6 +5415,7 @@ packages: /sourcemap-codec/1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + deprecated: Please use @jridgewell/sourcemap-codec instead /spdx-correct/3.1.1: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} @@ -5662,6 +5720,10 @@ packages: stable: 0.1.8 dev: true + /systemjs/6.13.0: + resolution: {integrity: sha512-P3cgh2bpaPvAO2NE3uRp/n6hmk4xPX4DQf+UzTlCAycssKdqhp6hjw+ENWe+aUS7TogKRFtptMosTSFeC6R55g==} + dev: true + /table/6.8.1: resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} engines: {node: '>=10.0.0'} @@ -5673,6 +5735,17 @@ packages: strip-ansi: 6.0.1 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: resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} engines: {node: '>=0.10'} @@ -5944,7 +6017,7 @@ packages: chalk: 4.1.2 debug: 4.3.4 fs-extra: 10.1.0 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia transitivePeerDependencies: - supports-color dev: true @@ -5965,7 +6038,7 @@ packages: '@types/eslint': 8.4.10 eslint: 8.29.0 rollup: 2.79.1 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia dev: true /vite-plugin-progress/0.0.6_vite@3.2.5: @@ -5977,7 +6050,7 @@ packages: picocolors: 1.0.0 progress: 2.0.3 rd: 2.0.1 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia dev: true /vite-plugin-purge-icons/0.9.1_vite@3.2.5: @@ -5989,7 +6062,7 @@ packages: '@purge-icons/core': 0.9.1 '@purge-icons/generated': 0.9.0 rollup-plugin-purge-icons: 0.9.1 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia transitivePeerDependencies: - encoding - supports-color @@ -6007,7 +6080,7 @@ packages: fs-extra: 10.1.0 magic-string: 0.25.9 pathe: 0.2.0 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia dev: true /vite-plugin-svg-icons/2.0.1_vite@3.2.5: @@ -6023,7 +6096,7 @@ packages: pathe: 0.2.0 svg-baker: 1.7.0 svgo: 2.8.0 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia transitivePeerDependencies: - supports-color dev: true @@ -6035,7 +6108,7 @@ packages: dependencies: '@vue/compiler-sfc': 3.2.45 magic-string: 0.25.9 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia dev: true /vite-plugin-windicss/1.8.8_vite@3.2.5: @@ -6046,13 +6119,13 @@ packages: '@windicss/plugin-utils': 1.8.8 debug: 4.3.4 kolorist: 1.6.0 - vite: 3.2.5_clvymlzunojxjbv3h6i2warera + vite: 3.2.5_hkozoy3rp4unz5ikgaby45vsia windicss: 3.5.6 transitivePeerDependencies: - supports-color dev: true - /vite/3.2.5_clvymlzunojxjbv3h6i2warera: + /vite/3.2.5_hkozoy3rp4unz5ikgaby45vsia: resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -6083,6 +6156,7 @@ packages: resolve: 1.22.1 rollup: 2.79.1 sass: 1.56.1 + terser: 5.16.1 optionalDependencies: fsevents: 2.3.2 dev: true diff --git a/yudao-ui-admin-vue3/vite.config.ts b/yudao-ui-admin-vue3/vite.config.ts index 3cd68daaa..6531be705 100644 --- a/yudao-ui-admin-vue3/vite.config.ts +++ b/yudao-ui-admin-vue3/vite.config.ts @@ -33,11 +33,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { open: env.VITE_OPEN, // 本地跨域代理 proxy: { - ['/dev-api']: { + ['/admin-api']: { target: env.VITE_BASE_URL, ws: false, changeOrigin: true, - rewrite: (path) => path.replace(new RegExp(`^/dev-api`), ''), + rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''), }, }, },