News for hackers. Stuff that matters.
Re:Tiny Treeshaker: JavaScript tree shaking in 200 lines of ... by onion2k on Tuesday June 29, 2021 @05:57AM (#27673838)
Something that drives me bonkers about current tree shaking is that there’s no good way to see what got shaken.

On a super basic level you can just build with and without tree-shaking and diff the results. If you turn off transpiling and minification, and move your bundled NPM modules to their own separate file, you can see what parts of your own code got shaken out pretty easily.

I'm tempted to have a go at writing a tool to do that actually. It would be useful.

Re:Tiny Treeshaker: JavaScript tree shaking in 200 lines of ... by jgalt212 on Tuesday June 29, 2021 @06:56AM (#27674157)
diffs (and network graphs) seem like a great idea, but they quickly get so big that one can't make heads or tails of the visualization.