Hacker News new | ask | show | jobs
by moritzwarhier 19 days ago
In Webpack times, early React 18 days, manual config, "ejected" and adjusted from CRA, I did have it in my production bundle.

I just gave up checking on why after a couple hours because it was a hobby project.

Haven't seen it in a long time since then, but there are many overlapping factors here.

As far as I know, Vite/Rollup tree shaking is strictly better than what Webpack + Terser did, but I'm wondering where the difference comes from.

Maybe it's even a JSDoc annotation or something else that is esoteric.

Because tree-shaking all property names in JS without making static analysis arbitrarily complex, is still not possible.

So, if the change was not on React's side, I'd guess it is in bundler minifying heuristics or a backwards-compatible change that makes the property name inaccessible and erasable by other means.