Commit 3c59915df643006c2f68a10741acfda3062e7d9f
1 parent
402d477f
页面标题设置 & 打包配置
Showing
6 changed files
with
162 additions
and
9 deletions
index.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <meta charset="UTF-8" /> | 4 | <meta charset="UTF-8" /> |
| 5 | <link rel="icon" href="/favicon.ico" /> | 5 | <link rel="icon" href="/favicon.ico" /> |
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 7 | - <title>Vite App</title> | 7 | + <title></title> |
| 8 | <script type="text/javascript"> | 8 | <script type="text/javascript"> |
| 9 | // chrome 71 以下不支持globalThis | 9 | // chrome 71 以下不支持globalThis |
| 10 | globalThis = window | 10 | globalThis = window |
package-lock.json
| @@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
| 29 | "es6-promise": "^4.2.8", | 29 | "es6-promise": "^4.2.8", |
| 30 | "typescript": "^4.4.4", | 30 | "typescript": "^4.4.4", |
| 31 | "vite": "^2.7.2", | 31 | "vite": "^2.7.2", |
| 32 | + "vite-plugin-compression": "^0.4.0", | ||
| 32 | "vue-tsc": "^0.29.8" | 33 | "vue-tsc": "^0.29.8" |
| 33 | } | 34 | } |
| 34 | }, | 35 | }, |
| @@ -2914,6 +2915,20 @@ | @@ -2914,6 +2915,20 @@ | ||
| 2914 | "stream-consume": "^0.1.0" | 2915 | "stream-consume": "^0.1.0" |
| 2915 | } | 2916 | } |
| 2916 | }, | 2917 | }, |
| 2918 | + "node_modules/fs-extra": { | ||
| 2919 | + "version": "10.0.0", | ||
| 2920 | + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", | ||
| 2921 | + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", | ||
| 2922 | + "dev": true, | ||
| 2923 | + "dependencies": { | ||
| 2924 | + "graceful-fs": "^4.2.0", | ||
| 2925 | + "jsonfile": "^6.0.1", | ||
| 2926 | + "universalify": "^2.0.0" | ||
| 2927 | + }, | ||
| 2928 | + "engines": { | ||
| 2929 | + "node": ">=12" | ||
| 2930 | + } | ||
| 2931 | + }, | ||
| 2917 | "node_modules/fs.realpath": { | 2932 | "node_modules/fs.realpath": { |
| 2918 | "version": "1.0.0", | 2933 | "version": "1.0.0", |
| 2919 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", | 2934 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", |
| @@ -2996,6 +3011,12 @@ | @@ -2996,6 +3011,12 @@ | ||
| 2996 | "node": ">=4" | 3011 | "node": ">=4" |
| 2997 | } | 3012 | } |
| 2998 | }, | 3013 | }, |
| 3014 | + "node_modules/graceful-fs": { | ||
| 3015 | + "version": "4.2.8", | ||
| 3016 | + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", | ||
| 3017 | + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", | ||
| 3018 | + "dev": true | ||
| 3019 | + }, | ||
| 2999 | "node_modules/has": { | 3020 | "node_modules/has": { |
| 3000 | "version": "1.0.3", | 3021 | "version": "1.0.3", |
| 3001 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", | 3022 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", |
| @@ -3223,6 +3244,18 @@ | @@ -3223,6 +3244,18 @@ | ||
| 3223 | "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", | 3244 | "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", |
| 3224 | "dev": true | 3245 | "dev": true |
| 3225 | }, | 3246 | }, |
| 3247 | + "node_modules/jsonfile": { | ||
| 3248 | + "version": "6.1.0", | ||
| 3249 | + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", | ||
| 3250 | + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", | ||
| 3251 | + "dev": true, | ||
| 3252 | + "dependencies": { | ||
| 3253 | + "universalify": "^2.0.0" | ||
| 3254 | + }, | ||
| 3255 | + "optionalDependencies": { | ||
| 3256 | + "graceful-fs": "^4.1.6" | ||
| 3257 | + } | ||
| 3258 | + }, | ||
| 3226 | "node_modules/jstransformer": { | 3259 | "node_modules/jstransformer": { |
| 3227 | "version": "1.0.0", | 3260 | "version": "1.0.0", |
| 3228 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", | 3261 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", |
| @@ -3948,6 +3981,15 @@ | @@ -3948,6 +3981,15 @@ | ||
| 3948 | "node": ">=4" | 3981 | "node": ">=4" |
| 3949 | } | 3982 | } |
| 3950 | }, | 3983 | }, |
| 3984 | + "node_modules/universalify": { | ||
| 3985 | + "version": "2.0.0", | ||
| 3986 | + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", | ||
| 3987 | + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", | ||
| 3988 | + "dev": true, | ||
| 3989 | + "engines": { | ||
| 3990 | + "node": ">= 10.0.0" | ||
| 3991 | + } | ||
| 3992 | + }, | ||
| 3951 | "node_modules/upath": { | 3993 | "node_modules/upath": { |
| 3952 | "version": "2.0.1", | 3994 | "version": "2.0.1", |
| 3953 | "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", | 3995 | "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", |
| @@ -3994,6 +4036,43 @@ | @@ -3994,6 +4036,43 @@ | ||
| 3994 | } | 4036 | } |
| 3995 | } | 4037 | } |
| 3996 | }, | 4038 | }, |
| 4039 | + "node_modules/vite-plugin-compression": { | ||
| 4040 | + "version": "0.4.0", | ||
| 4041 | + "resolved": "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.4.0.tgz", | ||
| 4042 | + "integrity": "sha512-CGC8DfIey0k4S4o54ylwFIzT1Mjb9s7cMmlXj6DMM1MZZIeWFjPCJc6YZWjnnS28ul3r7R1nmihvYvGg/lOYsQ==", | ||
| 4043 | + "dev": true, | ||
| 4044 | + "dependencies": { | ||
| 4045 | + "chalk": "^4.1.2", | ||
| 4046 | + "debug": "^4.3.3", | ||
| 4047 | + "fs-extra": "^10.0.0" | ||
| 4048 | + }, | ||
| 4049 | + "peerDependencies": { | ||
| 4050 | + "vite": ">=2.0.0" | ||
| 4051 | + } | ||
| 4052 | + }, | ||
| 4053 | + "node_modules/vite-plugin-compression/node_modules/debug": { | ||
| 4054 | + "version": "4.3.3", | ||
| 4055 | + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", | ||
| 4056 | + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", | ||
| 4057 | + "dev": true, | ||
| 4058 | + "dependencies": { | ||
| 4059 | + "ms": "2.1.2" | ||
| 4060 | + }, | ||
| 4061 | + "engines": { | ||
| 4062 | + "node": ">=6.0" | ||
| 4063 | + }, | ||
| 4064 | + "peerDependenciesMeta": { | ||
| 4065 | + "supports-color": { | ||
| 4066 | + "optional": true | ||
| 4067 | + } | ||
| 4068 | + } | ||
| 4069 | + }, | ||
| 4070 | + "node_modules/vite-plugin-compression/node_modules/ms": { | ||
| 4071 | + "version": "2.1.2", | ||
| 4072 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | ||
| 4073 | + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", | ||
| 4074 | + "dev": true | ||
| 4075 | + }, | ||
| 3997 | "node_modules/vite-plugin-legacy": { | 4076 | "node_modules/vite-plugin-legacy": { |
| 3998 | "version": "2.1.0", | 4077 | "version": "2.1.0", |
| 3999 | "resolved": "https://registry.npmjs.org/vite-plugin-legacy/-/vite-plugin-legacy-2.1.0.tgz", | 4078 | "resolved": "https://registry.npmjs.org/vite-plugin-legacy/-/vite-plugin-legacy-2.1.0.tgz", |
| @@ -6393,6 +6472,17 @@ | @@ -6393,6 +6472,17 @@ | ||
| 6393 | "stream-consume": "^0.1.0" | 6472 | "stream-consume": "^0.1.0" |
| 6394 | } | 6473 | } |
| 6395 | }, | 6474 | }, |
| 6475 | + "fs-extra": { | ||
| 6476 | + "version": "10.0.0", | ||
| 6477 | + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", | ||
| 6478 | + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", | ||
| 6479 | + "dev": true, | ||
| 6480 | + "requires": { | ||
| 6481 | + "graceful-fs": "^4.2.0", | ||
| 6482 | + "jsonfile": "^6.0.1", | ||
| 6483 | + "universalify": "^2.0.0" | ||
| 6484 | + } | ||
| 6485 | + }, | ||
| 6396 | "fs.realpath": { | 6486 | "fs.realpath": { |
| 6397 | "version": "1.0.0", | 6487 | "version": "1.0.0", |
| 6398 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", | 6488 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", |
| @@ -6450,6 +6540,12 @@ | @@ -6450,6 +6540,12 @@ | ||
| 6450 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", | 6540 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", |
| 6451 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" | 6541 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" |
| 6452 | }, | 6542 | }, |
| 6543 | + "graceful-fs": { | ||
| 6544 | + "version": "4.2.8", | ||
| 6545 | + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", | ||
| 6546 | + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", | ||
| 6547 | + "dev": true | ||
| 6548 | + }, | ||
| 6453 | "has": { | 6549 | "has": { |
| 6454 | "version": "1.0.3", | 6550 | "version": "1.0.3", |
| 6455 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", | 6551 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", |
| @@ -6616,6 +6712,16 @@ | @@ -6616,6 +6712,16 @@ | ||
| 6616 | "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", | 6712 | "integrity": "sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg==", |
| 6617 | "dev": true | 6713 | "dev": true |
| 6618 | }, | 6714 | }, |
| 6715 | + "jsonfile": { | ||
| 6716 | + "version": "6.1.0", | ||
| 6717 | + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", | ||
| 6718 | + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", | ||
| 6719 | + "dev": true, | ||
| 6720 | + "requires": { | ||
| 6721 | + "graceful-fs": "^4.1.6", | ||
| 6722 | + "universalify": "^2.0.0" | ||
| 6723 | + } | ||
| 6724 | + }, | ||
| 6619 | "jstransformer": { | 6725 | "jstransformer": { |
| 6620 | "version": "1.0.0", | 6726 | "version": "1.0.0", |
| 6621 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", | 6727 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", |
| @@ -7181,6 +7287,12 @@ | @@ -7181,6 +7287,12 @@ | ||
| 7181 | "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", | 7287 | "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", |
| 7182 | "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==" | 7288 | "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==" |
| 7183 | }, | 7289 | }, |
| 7290 | + "universalify": { | ||
| 7291 | + "version": "2.0.0", | ||
| 7292 | + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", | ||
| 7293 | + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", | ||
| 7294 | + "dev": true | ||
| 7295 | + }, | ||
| 7184 | "upath": { | 7296 | "upath": { |
| 7185 | "version": "2.0.1", | 7297 | "version": "2.0.1", |
| 7186 | "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", | 7298 | "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", |
| @@ -7199,6 +7311,34 @@ | @@ -7199,6 +7311,34 @@ | ||
| 7199 | "rollup": "^2.59.0" | 7311 | "rollup": "^2.59.0" |
| 7200 | } | 7312 | } |
| 7201 | }, | 7313 | }, |
| 7314 | + "vite-plugin-compression": { | ||
| 7315 | + "version": "0.4.0", | ||
| 7316 | + "resolved": "https://registry.npmjs.org/vite-plugin-compression/-/vite-plugin-compression-0.4.0.tgz", | ||
| 7317 | + "integrity": "sha512-CGC8DfIey0k4S4o54ylwFIzT1Mjb9s7cMmlXj6DMM1MZZIeWFjPCJc6YZWjnnS28ul3r7R1nmihvYvGg/lOYsQ==", | ||
| 7318 | + "dev": true, | ||
| 7319 | + "requires": { | ||
| 7320 | + "chalk": "^4.1.2", | ||
| 7321 | + "debug": "^4.3.3", | ||
| 7322 | + "fs-extra": "^10.0.0" | ||
| 7323 | + }, | ||
| 7324 | + "dependencies": { | ||
| 7325 | + "debug": { | ||
| 7326 | + "version": "4.3.3", | ||
| 7327 | + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", | ||
| 7328 | + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", | ||
| 7329 | + "dev": true, | ||
| 7330 | + "requires": { | ||
| 7331 | + "ms": "2.1.2" | ||
| 7332 | + } | ||
| 7333 | + }, | ||
| 7334 | + "ms": { | ||
| 7335 | + "version": "2.1.2", | ||
| 7336 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", | ||
| 7337 | + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", | ||
| 7338 | + "dev": true | ||
| 7339 | + } | ||
| 7340 | + } | ||
| 7341 | + }, | ||
| 7202 | "vite-plugin-legacy": { | 7342 | "vite-plugin-legacy": { |
| 7203 | "version": "2.1.0", | 7343 | "version": "2.1.0", |
| 7204 | "resolved": "https://registry.npmjs.org/vite-plugin-legacy/-/vite-plugin-legacy-2.1.0.tgz", | 7344 | "resolved": "https://registry.npmjs.org/vite-plugin-legacy/-/vite-plugin-legacy-2.1.0.tgz", |
package.json
src/utils/progress.ts
| @@ -8,6 +8,9 @@ router.beforeEach((to: any, from: any, next: any) => { | @@ -8,6 +8,9 @@ router.beforeEach((to: any, from: any, next: any) => { | ||
| 8 | NProgress.start() | 8 | NProgress.start() |
| 9 | const hasToken = 1 && 1 | 9 | const hasToken = 1 && 1 |
| 10 | const whiteList = ['/login'] | 10 | const whiteList = ['/login'] |
| 11 | + | ||
| 12 | + // 页面标题设置 | ||
| 13 | + globalThis.document.title = to.meta.title? to.meta.title: import.meta.env.VITE_APP_TITLE | ||
| 11 | 14 | ||
| 12 | if (hasToken) { | 15 | if (hasToken) { |
| 13 | if (to.path === '/login') { | 16 | if (to.path === '/login') { |
| @@ -22,10 +25,6 @@ router.beforeEach((to: any, from: any, next: any) => { | @@ -22,10 +25,6 @@ router.beforeEach((to: any, from: any, next: any) => { | ||
| 22 | next() | 25 | next() |
| 23 | } else { | 26 | } else { |
| 24 | if (from.path !== '/') { | 27 | if (from.path !== '/') { |
| 25 | - // Vue.prototype.$message({ | ||
| 26 | - // type: 'error', | ||
| 27 | - // message: '请重新登录' | ||
| 28 | - // }) | ||
| 29 | console.log('请重新登录') | 28 | console.log('请重新登录') |
| 30 | } | 29 | } |
| 31 | next({ path: '/login' }) | 30 | next({ path: '/login' }) |
src/views/tengxi/index.vue
vite.config.ts
| 1 | import { defineConfig, loadEnv } from 'vite' | 1 | import { defineConfig, loadEnv } from 'vite' |
| 2 | import vue from '@vitejs/plugin-vue' | 2 | import vue from '@vitejs/plugin-vue' |
| 3 | -import legacy from '@vitejs/plugin-legacy' | 3 | +import viteCompression from 'vite-plugin-compression' // gzip压缩 |
| 4 | +import legacy from '@vitejs/plugin-legacy' // 兼容性 | ||
| 4 | const { resolve } = require('path') | 5 | const { resolve } = require('path') |
| 5 | 6 | ||
| 6 | // https://vitejs.dev/config/ | 7 | // https://vitejs.dev/config/ |
| 7 | export default ({command, mode}) => { | 8 | export default ({command, mode}) => { |
| 8 | const envConfig = loadEnv(mode, './'); | 9 | const envConfig = loadEnv(mode, './'); |
| 10 | + let isOpenSourceMap = mode === 'production'? false: true | ||
| 9 | return defineConfig({ | 11 | return defineConfig({ |
| 10 | plugins: [ | 12 | plugins: [ |
| 11 | vue(), | 13 | vue(), |
| 14 | + viteCompression(), | ||
| 12 | legacy({ | 15 | legacy({ |
| 13 | targets: ['> 1%, last 2 version, ie >= 11, chrome >= 69'], | 16 | targets: ['> 1%, last 2 version, ie >= 11, chrome >= 69'], |
| 14 | additionalLegacyPolyfills: ['regenerator-runtime/runtime'], | 17 | additionalLegacyPolyfills: ['regenerator-runtime/runtime'], |
| @@ -25,6 +28,7 @@ export default ({command, mode}) => { | @@ -25,6 +28,7 @@ export default ({command, mode}) => { | ||
| 25 | }, | 28 | }, |
| 26 | server: { | 29 | server: { |
| 27 | base: envConfig.VITE_BASE_URL, | 30 | base: envConfig.VITE_BASE_URL, |
| 31 | + open: false | ||
| 28 | }, | 32 | }, |
| 29 | css: { | 33 | css: { |
| 30 | postcss: { | 34 | postcss: { |
| @@ -50,8 +54,18 @@ export default ({command, mode}) => { | @@ -50,8 +54,18 @@ export default ({command, mode}) => { | ||
| 50 | } | 54 | } |
| 51 | }, | 55 | }, |
| 52 | build: { | 56 | build: { |
| 53 | - target: 'es2015', | ||
| 54 | - outDir: 'dist' | 57 | + sourcemap: isOpenSourceMap, |
| 58 | + manifest: true, | ||
| 59 | + target: 'esnext', | ||
| 60 | + outDir: 'dist', | ||
| 61 | + chunkSizeWarningLimit: 600, | ||
| 62 | + rollupOptions: { | ||
| 63 | + output: { | ||
| 64 | + manualChunks: { | ||
| 65 | + 'element-plus': ['element-plus'], | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + } | ||
| 55 | }, | 69 | }, |
| 56 | }) | 70 | }) |
| 57 | } | 71 | } |