Component Pruner – I built a VS Code extension that finds unused React/Next.js/frontend code AND deletes it safely with one click. Every React codebase has dead components hiding in the code. You find them, but deleting? That's risky—one wrong move breaks imports, breaks production. Works with: React, Next.js, Vue, Svelte, Angular, and any frontend library using JSX/TSX/JS/TS components. How it works in 4 phases: Phase 1: Smart Scanning 🔍 Analyzes your entire project, finds all components in seconds. Distinguishes real components from utilities. Phase 2: Dependency Analysis 🔗 Maps every single import connection. Shows exactly what imports what, who depends on what. Phase 3: Safety Validation ⚠️ Before deletion, checks ALL risks: What files import this component? Indirect references (string mentions)? Test files depending on it? Dynamic imports? You see everything before clicking delete. No surprises. Phase 4: Safe One-Click Deletion 🧹 Delete button removes: ✓ Unused component file ✓ All orphaned imports automatically ✓ Keeps code structure intact ✓ Bundle size shrinks Key difference: Other tools list unused code. This one actually removes it safely. Real example: Found 28 unused components Checked dependencies (all clear) Clicked delete 2MB gone, zero broken code Results: ✓ Hours → 30 seconds ✓ 15-20% bundle reduction ✓ Cleaner codebase ✓ No production breaks Extension LIve url in VS Code Marketplace 🚀: https://lnkd.in/gHwGaGGY Github Link: https://lnkd.in/gnuF_NHq Built with TypeScript for React/Next.js/Vue/Svelte/Angular teams. If you work on a frontend codebase, please try this extension, share your feedback, and feel free to open issues or contribute ideas/PRs on GitHub—your suggestions will directly shape the next versions. Questions about safe deletion? Ask below! 👇 #VSCode #VSCodeExtension #ReactJS #WebDevelopment #FrontendDevelopment #DeveloperTools #TypeScript #JavaScript #OpenSource #Productivity #TechTools #hiring #SoftwareEngineering #CodeQuality #BestPractices #DeveloperCommunity #BuildInPublic #LaunchDay #NewYear2026 #Innovation #TechTrends #NextJS
Wow, that's pretty cool. I already have in mind a codebase where about 30% of the code would be deleted, conservatively speaking. I definitely will test it bro
Amazing🎉 I will try it
Much needed, will use
On my NextJS project, all components listed on "Safe to Delete" were being used + it recommended to delete my routes(I'm using app router)
Sure we will use it. Appreciate it 👍
This is a brilliant solution for managing frontend codebases! The key difference of safely removing unused components, rather than just listing them, addresses a major pain point. The detailed safety validation, dependency analysis, and automatic orphaned import removal are incredibly well-thought-out. Achieving bundle size reduction and a cleaner codebase with such confidence is a huge win. Eager to try Component Pruner!