You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am curious , why does rollup need to analyze anything that is inside an if ? I thought rollup would only be concerned about finding top level import and export.
Today, rollup can detect that if bar is always false, then foo will be tree-shaken even though its call is inside a function. It is a common misconception that tree-shaking has to do anything with top level ES module statements or ES modules at all. Incidentally, I recently held a talk explaining this: https://events.techcast.com/btd/2018/Garmisch_1130/
For cases like -
surely we have all the analysis at this point to know that
a.b.d
is undefined and therefore falsy? Is this related to #2215?The text was updated successfully, but these errors were encountered: