stealjs / steal

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

steal-clone does work with tree-shaken dependencies #1470

Closed matthewp closed 5 years ago

matthewp commented 5 years ago

steal-clone copies configuration, which eventually includes a load's metadata. For tree-shaking we use Sets to keep track of which exported names are used. It's like Set{ "DefineMap", "Component" }. steal-clone's configuration cloning turns these into normal objects, and so we throw when the code does set.has(str).