News for hackers. Stuff that matters.
Re:JavaScript Minification Benchmarks by jiofih on Sunday February 07, 2021 @11:20AM (#26055972)
Rollup’s tree shaking should have the same result - the way I understand it, it puts all module exports in the same scope, renaming variables to avoid conflicts, and removing duplicates. Then while “shaking” the dependency tree, a function that is only used by another imported module will end up in one of the dynamically loaded parts, i.e. not the main bundle. Where exactly it was first imported is irrelevant for its location in the output files.

For snowpack, it’s just a natural consequence of runtime imports.

There are no comments on this comment yet.