enhancementgood first issuehacktoberfest
仓库指标
- 星标
- (1,087 个星标)
- PR 合并指标
- (平均合并 1天 23小时) (30 天内合并 82 个 PR)
描述
Description
Install and configure Next.js bundle analyzer to identify large dependencies and optimize bundle size.
Problem
- No visibility into bundle composition
- Unknown which dependencies are increasing bundle size
- No metrics for code splitting effectiveness
- Difficult to identify optimization opportunities
Current Dependencies
Some potentially large dependencies:
framer-motion- Animation libraryhighlight.js- Syntax highlightingmarked- Markdown parserlucide-react- Icon library- Various other dependencies
Proposed Solution
Add @next/bundle-analyzer to:
- Visualize bundle composition
- Identify large dependencies
- Find duplicate code
- Optimize code splitting
- Track bundle size over time
Acceptance Criteria
- Install
@next/bundle-analyzer - Configure in
next.config.mjs - Add npm script:
npm run analyze - Document bundle analysis process
- Create baseline bundle size report
- Add bundle size to PR checks (optional)
- Document findings and optimization recommendations
Files to Modify
package.json- Add dependency and scriptnext.config.mjs- Configure analyzerdocs/bundle-analysis.md- New documentation