You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
751 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// vite.config.ts
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import path from 'path'
import { visualizer } from 'rollup-plugin-visualizer';
export default defineConfig({
plugins: [uni(),
visualizer({
open: true, // 构建后自动打开分析页面
gzipSize: true, // 显示gzip压缩后体积
brotliSize: true, // 显示brotli压缩后体积
filename: 'stats.html', // 输出文件名
template: 'treemap' // 可选模板sunburst/flamegraph/network等:ml-citation{ref="2,3" data="citationList"}
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'/static': path.resolve(__dirname, 'src/static') // 关键配置
}
}
})