Shopify / sprockets-commoner

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

Exclude Bundler paths by default #54

Open tylerball opened 7 years ago

tylerball commented 7 years ago

I've come across some issues where anyone who has Bundler configured to install gems locally to a project directory can experience Schmooze errors because commoner sees these files as part of env.root and tries to compile them.

Is there a way Commoner could hook into bundler configuration and be aware of this and automatically exclude these paths?

jtomaszewski commented 7 years ago

Isn't this solved by the example config/initializers/sprockets_commoner.rb configuration given in README ? (you can exclude f.e. vendor/bundle there)

I'm not sure about the issue, just pointing this out.

bouk commented 7 years ago

commoner has vendor/bundle in there by default: https://github.com/Shopify/sprockets-commoner/blob/01bbb2897b9e1f73b8b11426e5d8082611bdf72c/lib/sprockets/commoner/processor.rb#L64

you can always add more