stealjs / steal-tools

Build easy. Load fast.
https://stealjs.com/docs/steal-tools.html
MIT License
67 stars 23 forks source link

Account for modules without importNames #1097

Closed matthewp closed 5 years ago

matthewp commented 5 years ago

importNames is used for tree-shaking, but non-ES modules will not have this metadata. Previously we assumed anything with importSpecifiers also had importNames, but this isn't the case; stache files have the specifiers metadata which is used for error reporting.

This fixes a regression in steal-tools 2.0.8.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.005%) to 93.764% when pulling 9442dc3291e2144d33b8f76a1d8569e9ec6b6378 on guard-importspecifiers into 492651fe212c6cd1e7e0c0f0ac15484358dbfba6 on master.