feat: init

This commit is contained in:
ygx
2026-03-05 23:45:39 +08:00
commit 8fab91c5c7
214 changed files with 33682 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/**
* Generation packaging analysis
* 生成打包分析
*
* Vite 7 + rollup-plugin-visualizer 目前是 ESM-only
* 为避免在打包 vite.config.prod.ts 时被 esbuild 以 require 方式加载失败,
* 这里取消默认引入,仅在需要时手动在本地临时打开分析。
*/
import { isReportMode } from '../utils'
export default function configVisualizerPlugin() {
// 如需开启打包分析,可改为动态引入 rollup-plugin-visualizer
// const { visualizer } = await import('rollup-plugin-visualizer')
// 并返回相应插件实例。
if (isReportMode()) {
// 先返回空数组以保证构建稳定
return []
}
return []
}