You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
Module bundlers like Rollup can do tree-shaking to create a bundle that includes only the code that’s used.
If a member is imported from a CommonJS module using the correct syntax, the tree shaking can include that module.
So the first part goes to the heart of ESM being statically analyzable, so that an all-ESM module graph can get pruned so that a bundle with only the used code is generated.
The second part I assume includes code like import { shuffle } from 'underscore' (as opposed to import _ from 'underscore') where we know that shuffle is the member being imported and so therefore the module graph can include just shuffle rather than all of underscore. See also #100 (comment)