Shopify / sprockets-commoner

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

Make the Sprockets asset depend on environment variables used #35

Closed bouk closed 7 years ago

bouk commented 7 years ago

This PR adds any included environment variables to the Sprockets asset dependencies, so that changes in said environment variables cause the cache to be invalidated and the asset to be reprocessed. This is important because many projects (like React) used NODE_ENV to conditionally exclude code that doesn't need to be in the production build. I already added support for substituting the variables in a previous PR but didn't add the cache dependency at the time

for review @rafaelfranca

rafaelfranca commented 7 years ago

:shipit: