Shopify / sprockets-commoner

Use Babel in Sprockets to compile JavaScript modules for the browser
MIT License
182 stars 22 forks source link

Schmooze throws `Cannot read property 'constant' of undefined` for dynamic requires #40

Closed tessalt closed 7 years ago

tessalt commented 7 years ago

Including a package that depended on https://github.com/component/closest/blob/master/index.js lead to this cryptic error when a require wrapped in a try/catch was encountered.

If we're only supporting static requires a better error would be helpful.

@bouk cc @tedtate @tanema

bouk commented 7 years ago

That module does some funky things with rewiring what is included, but I can see what I can do https://github.com/component/closest/blob/master/package.json