refactor(vite): visualizer 插件配置优化
This commit is contained in:
parent
569546c4dd
commit
ad3aa418b7
@ -51,7 +51,12 @@ export default ({ mode }) => {
|
|||||||
htmlPlugin(env.VITE_APP_TITLE),
|
htmlPlugin(env.VITE_APP_TITLE),
|
||||||
svgLoader(),
|
svgLoader(),
|
||||||
// 打包分析插件
|
// 打包分析插件
|
||||||
visualizer(),
|
visualizer({
|
||||||
|
filename: './node_modules/.cache/visualizer/stats.html',
|
||||||
|
open: true,
|
||||||
|
gzipSize: true,
|
||||||
|
brotliSize: true,
|
||||||
|
}),
|
||||||
ViteRestart({
|
ViteRestart({
|
||||||
// 通过这个插件,在修改vite.config.js文件则不需要重新运行也生效配置
|
// 通过这个插件,在修改vite.config.js文件则不需要重新运行也生效配置
|
||||||
restart: ['vite.config.js'],
|
restart: ['vite.config.js'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user