Optimize bundle size with code splitting and lazy loading
# Code Splitting Optimization
## Dynamic Imports
- Use React.lazy()
- Implement Suspense
- Split by route
- Component-level splitting
## Webpack Configuration
- Configure chunk splitting
- Use magic comments
- Implement preloading
- Configure bundle sizes
## Optimization Strategies
- Split vendor bundles
- Lazy load heavy components
- Preload critical chunks
- Use service workers
## Measurement
- Analyze bundle size
- Use Lighthouse
- Monitor Core Web Vitals
- Track loading performanceThis Performance prompt is ideal for developers working on:
By using this prompt, you can save hours of manual coding and ensure best practices are followed from the start. It's particularly valuable for teams looking to maintain consistency across their performance implementations.
Yes! All prompts on Antigravity AI Directory are free to use for both personal and commercial projects. No attribution required, though it's always appreciated.
This prompt works excellently with Claude, ChatGPT, Cursor, GitHub Copilot, and other modern AI coding assistants. For best results, use models with large context windows.
You can modify the prompt by adding specific requirements, constraints, or preferences. For Performance projects, consider mentioning your framework version, coding style, and any specific libraries you're using.