Skip to content

Commit

Permalink
build: main 分支不需要 visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
feige996 committed Mar 17, 2024
1 parent bd1a444 commit 83ec5cb
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
import AutoImport from 'unplugin-auto-import/vite'
// import viteCompression from 'vite-plugin-compression'
import ViteRestart from 'vite-plugin-restart'
import { visualizer } from 'rollup-plugin-visualizer'
import imagemin from './vite-plugins/imagemin'

// https://vitejs.dev/config/
export default ({ command, mode }) => {
Expand Down Expand Up @@ -92,17 +90,6 @@ export default ({ command, mode }) => {
return html.replace('%BUILD_DATE%', dayjs().format('YYYY-MM-DD HH:mm:ss'))
},
},
// 打包分析插件
mode === 'production' &&
visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
brotliSize: true,
}),
// 这个图片压缩插件比较耗时,希望仅在生产环境使用
// TODO: 缓存每次压缩过的图片,已经压缩过的不再压缩
imagemin(mode === 'production'),
],

css: {
Expand Down

0 comments on commit 83ec5cb

Please sign in to comment.