stealjs / steal

Gets JavaScript
https://stealjs.com
MIT License
1.37k stars 522 forks source link

Modules that export * do not re-execute to tree shake #1445

Closed matthewp closed 6 years ago

matthewp commented 6 years ago

When a module does export * and is progressively loaded, it should be able to be tree-shaken again (and then re-executed.

This doesn't seem to be happened because its previous used exports are not known, and we have a short cut that prevents doing the work of reparsing if we think it hasn't already been parsed.

We should be saving the used exports on the load.metadata object for export * modules.

matthewp commented 6 years ago

Fixed by #1446