stealjs / steal

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

ES module detection, remove strings before removing comments #1511

Closed matthewp closed 5 years ago

matthewp commented 5 years ago

This brings ES module detection more in line with how CJS detection works.

Ideally we would unify the 3 module format detections. This would take more work than what this PR does, this is a quick fix.

The AMD detection is the most robust but is part of looking for require() deps. It would take some major refactoring to make it work for our other use-cases.

So this works for now. Closes #1510