Something that drives me bonkers about current tree shaking is that there’s no good way to see what got shaken.<p>I want a graph that shows me all the branches that got culled.<p>Even better would be a dependency graph that shows me what is causing things not to be culled.<p>I had an issue where Antd was pulling in 200KB of icons and I couldn’t figure out why until I spent hours bisecting it by commenting out entire sections of my application.
Anyone have any experience using a Java treeshaker? I have a Clojure GUI/JFX App that's bloated and I've only managed to slim it down with manual package pruning.<p>I couldn't get Proguard to work with Clojure. Granted proguard is quite baroque so I probably did something wrong. But maybe there is some simpler solution out there for the JVM? Or would this simply be impossible b/c Clojure uses reflection? Though so does Javascript from what I understand..
I suspect (although I haven't checked the code) that this is actually a "dead code elimination" algorithm which is easier to write than a tree shaking algorithm.<p>Tree-shaking is actually "live code inclusion", the opposite side of dead code elimination.<p><a href="https://en.m.wikipedia.org/wiki/Tree_shaking" rel="nofollow">https://en.m.wikipedia.org/wiki/Tree_shaking</a>
The interesting stuff seems to be going on in <a href="https://github.com/facebook/jscodeshift" rel="nofollow">https://github.com/facebook/jscodeshift</a>