Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →使用 Rollup Visualizer 分析产物,并通过拆包 (Code Splitting) 和 Tree Shaking 减少首屏体积。
.claude/skills/tencentblueking-vite/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | -73% | 0% |
| case-01 | ✓→✓ | = Same ✓ | -19% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 5% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -14% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -14% | 0% |
当首屏加载慢 (FCP > 1.5s) 时,通常需要检查 JS Bundle 的体积。
首先"看见"哪些包最大。
bashnpm install rollup-plugin-visualizer -D
这是收益最大的优化点。
❌ import UserList from './views/UserList.vue' ✅ component: () => import('./views/UserList.vue')
将大型库(ECharts, bkui-vue)单独打包,避免 vendor hash 频繁变化。
❌ import _ from 'lodash' ✅ import debounce from 'lodash-es/debounce'
bashnpm install vite-plugin-compression -D
> 📦 获取完整 vite.config.ts 配置:skill://bundle-optimization/assets/vite.config.optimization.ts
skill://bundle-optimization/assets/vite.config.optimization.ts> 根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载
Other measured skills in the registry, with their headline benchmark lift.