parent
960306a160
commit
b1dbeecd49
|
|
@ -57,6 +57,7 @@
|
||||||
"pinia": "^2.0.33",
|
"pinia": "^2.0.33",
|
||||||
"screenfull": "^6.0.0",
|
"screenfull": "^6.0.0",
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
|
"terser": "^5.19.3",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-i18n": "9.2.2",
|
"vue-i18n": "9.2.2",
|
||||||
"vue-router": "^4.2.0",
|
"vue-router": "^4.2.0",
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,6 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||||
"element-plus/es/components/notification/style/css",
|
"element-plus/es/components/notification/style/css",
|
||||||
"@vueuse/core",
|
"@vueuse/core",
|
||||||
"sortablejs",
|
"sortablejs",
|
||||||
|
|
||||||
"path-to-regexp",
|
"path-to-regexp",
|
||||||
"echarts",
|
"echarts",
|
||||||
"@wangeditor/editor",
|
"@wangeditor/editor",
|
||||||
|
|
@ -196,5 +195,20 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||||
"codemirror",
|
"codemirror",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// 构建
|
||||||
|
build: {
|
||||||
|
chunkSizeWarningLimit: 2000, // 消除打包大小超过500kb警告
|
||||||
|
minify: "terser", // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
||||||
|
terserOptions: {
|
||||||
|
compress: {
|
||||||
|
keep_infinity: true, // 防止 Infinity 被压缩成 1/0,这可能会导致 Chrome 上的性能问题
|
||||||
|
drop_console: true, // 生产环境去除 console
|
||||||
|
drop_debugger: true, // 生产环境去除 debugger
|
||||||
|
},
|
||||||
|
format: {
|
||||||
|
comments: false, // 删除注释
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue