提交 bd5f3432 作者: 方治民

feat: 移除 terser minify

上级 fc8acd26
......@@ -26,7 +26,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
// The boolean type read by loadEnv is a string. This function can be converted to boolean type
const viteEnv = wrapperEnv(env)
const { VITE_PORT, VITE_PUBLIC_PATH, VITE_PROXY, VITE_DROP_CONSOLE } = viteEnv
const { VITE_PORT, VITE_PUBLIC_PATH, VITE_PROXY } = viteEnv
const isBuild = command === 'build'
......@@ -62,17 +62,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
build: {
target: 'es2015',
cssTarget: 'chrome80',
minify: 'terser',
/**
* 当 minify=“minify:'terser'” 解开注释
* Uncomment when minify="minify:'terser'"
*/
terserOptions: {
compress: {
keep_infinity: true,
drop_console: VITE_DROP_CONSOLE,
},
},
// Turning off brotliSize display can slightly reduce packaging time
reportCompressedSize: false,
chunkSizeWarningLimit: 2000,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论