Skip to content

Commit

Permalink
build(config): 不限制于serve命令启动依赖分析
Browse files Browse the repository at this point in the history
  • Loading branch information
lzm0x219 authored Jul 12, 2021
1 parent e8f868a commit 50081b5
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ const defineConfig: UserConfigFn = ({ command, mode }) => {
},
},
};
if (command === 'serve') {
if (mode === 'analyze') {
config.plugins.push(
visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
brotliSize: true,
})
);
}
if (mode === 'analyze') {
config.plugins.push(
visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
brotliSize: true,
})
);
}
return config;
};
Expand Down

0 comments on commit 50081b5

Please sign in to comment.