|
|
|
|
|
by giorgioz
1786 days ago
|
|
I think tree-shaking will be a default in new JS bundler.
ESbuild seem to enable it by default:
https://esbuild.github.io/ I think the reason some other bundlers like webpack didn't/don't have it by default is because tree-shaking became popular after they were invented and tree-shaking was added to the bundler later on as an extra nice-to-have feature. It seems webpack has built-in support for tree-shaking from version 2. Latest version of webpack might have it enabled by default (not 100% sure but possible)
https://webpack.js.org/guides/tree-shaking/ |
|