I haven’t done serious web work in ages but if I did I’m quite sure I’d find all of today’s “required” build tools quite frustrating.
https://developer.mozilla.org/en-US/docs/Web/API/Element/cla...
Builtin functions for adding, removing, toggling and querying classes on elements.
See:
- https://github.com/webpack/webpack/issues/2867
- https://github.com/webpack/webpack/issues/4784
(Note: webpack doesn't do any dead code elimination, it relies on UglifyJS to do so)
Are you aware of any alternative that can do tree shaking? Reading those issues' comments there is a link to babel-webpack-tree-shaking [1] which seems to do it?
[1] https://github.com/Aladdin-ADD/babel-webpack-tree-shaking
But both come with their own tradeoffs: Rollup is ES6 only and doesn't support certain features from TC39's Stage 3. Babili is very very new :)