HomeComputer ScienceTree-Shaking Dependency Graph Pruner

Tree-Shaking Dependency Graph Pruner

Interactive 3D module dependency graph: run reachability analysis (DFS) from the app entry point, prune dead modules with tree-shaking, and watch the mobile app bundle size shrink live in kilobytes.

Computer Science3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
mobile-app-bundling-size-optimization ↗ Open standalone

Mobile bundlers don't shrink an app by guessing — they run reachability analysis. This simulator builds a real module dependency graph in 3D, runs a depth-first search from a chosen entry point, and colors every module by whether the bundler would actually keep it. Toggle tree-shaking off to see the unpruned bundle, toggle minification to see a further flat cut on the surviving code, add random dependency edges to watch how a single new import can drag a whole unreachable cluster back into the shipped bundle, and read the live kept/pruned size in kilobytes plus the overall size-reduction percentage.

⚙ Under the hood

Interactive 3D module dependency graph: run depth-first reachability analysis from the app entry point, prune dead modules with tree-shaking and minification, and watch the mobile app bundle size shrink live in kilobytes.

tree-shakingbundle-sizedependency-graphdead-code-eliminationmobile-devdfs

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)