引入
ts
import { analyzeIndexBundle } from 't-comm';
// 不支持 tree-shaking 的项目
import { analyzeIndexBundle} from 't-comm/lib/bundle-analyze/index';
// 只支持 ESM 的项目
import { analyzeIndexBundle} from 't-comm/es/bundle-analyze/index';analyzeIndexBundle(config)
描述:
分析首页Bundle信息
参数:
| 参数名 | 类型 | 描述 |
|---|---|---|
| config | 配置 | |
| config.domain | string | 域名 |
| config.buildPath | string | 打包路径 |
示例
ts
analyzeIndexBundle({
domain: '',
buildPath: '',
})