Optimize bundle size and implement code splitting
Description
The web-app-react bundle size is too large (5.2MB), causing slow initial load times.
Current Metrics
- Bundle size: 5.2MB
- First Contentful Paint: 4.2s
- Time to Interactive: 6.8s
Tasks
-
Implement React.lazy() for route-based code splitting -
Analyze bundle with webpack-bundle-analyzer -
Remove unused dependencies -
Optimize images and assets -
Implement dynamic imports for heavy components
Target Metrics
- Bundle size: <1MB (main chunk)
- FCP: <2s
- TTI: <3.5s
cc @jean @michael