Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix rollup dependency removal #442
What I originally thought was a tree-shaking bug turned out to be way more complicated.
So, here's what was going on.
So, how to fix it? The answer for now is to support both flows!
If a file is already in the tree the code needs to check how many times it's run a build. If it's the first time do the light removal that only removes that file and the files that depend on it. If this is a watch-triggered multi-build then the aggressive removal step needs to be taken to also remove all the files the target file depends on.
@@ Coverage Diff @@ ## master #442 +/- ## ========================================= + Coverage 99.09% 99.1% +<.01% ========================================= Files 31 31 Lines 776 780 +4 Branches 119 120 +1 ========================================= + Hits 769 773 +4 Misses 7 7