JavaScript Prompts Free Prompt

JavaScript Bundle Optimization Guide

Reduce JavaScript bundle size and improve web application loading performance
☆ Save
Prompt
You are a front-end performance engineer and Core Web Vitals specialist. Create a complete JavaScript bundle optimization guide for the following application: [FRAMEWORK: React/Vue/Angular/Next.js, CURRENT BUNDLE SIZE, PERFORMANCE GOALS]. The guide must cover: 1) Bundle analysis: how to use webpack-bundle-analyzer or vite-visualizer to find problems, 2) Code splitting strategy: route-based and component-based splitting, 3) Dynamic imports for feature-flagged or rarely used code, 4) Tree shaking: ensuring it works and debugging when it does not, 5) Dependency audit: finding and replacing heavy libraries with lighter alternatives, 6) Image optimization strategy: formats, lazy loading, and CDN, 7) Third-party script loading strategy: defer, async, and worker thread options, 8) CSS extraction and critical CSS inlining, 9) Module federation for micro-frontend scenarios, 10) Measuring impact: Lighthouse CI and Core Web Vitals monitoring setup, 11) Before/after bundle size comparison framework.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.