It is definitely not perfect. I would argue that the only way to move things forward, is if our dependencies ensure that we can tree shake, then we can start optimizing the mechanics. This is, however, not possible at all with CommonJS modules.
I'll check our your post later, looks super interesting, thanks for sharing!
Both rollup and parcel could tree shake CommonJS (terms and conditions apply).
For a better context just into this loooooong conversation - twitter.com/rich_harris/status/113...
My understanding is that webpack can do this too, but it's experimental as there are often side effects that webpack will not be able to see through code analysis. webpack.js.org/guides/tree-shaking...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Tree shaking is not enough:
It is definitely not perfect. I would argue that the only way to move things forward, is if our dependencies ensure that we can tree shake, then we can start optimizing the mechanics. This is, however, not possible at all with CommonJS modules.
I'll check our your post later, looks super interesting, thanks for sharing!
Both rollup and parcel could tree shake CommonJS (terms and conditions apply).
For a better context just into this loooooong conversation - twitter.com/rich_harris/status/113...
My understanding is that webpack can do this too, but it's experimental as there are often side effects that webpack will not be able to see through code analysis. webpack.js.org/guides/tree-shaking...