3 ms·
> There is also no tree-shaking e.g only loading functions which are really used. In most browser implementations ESM modules produce "proxy" objects that weak
by WorldMaker 4y ago
> There is also no tree-shaking e.g only loading functions which are really used.
In most browser implementations ESM modules produce "proxy" objects that weak reference un-JITed code until used and will (eventually) garbage-collect portions of the module that aren't ever imported/used by other modules. This can be seen as a sort of "natural" tree-shaking at runtime.