rails / sprockets

Rack-based asset packaging system
MIT License
932 stars 792 forks source link

Add ERB Support for React Assets #765

Closed haseebab closed 1 year ago

haseebab commented 1 year ago

Adding an example to guides/extending_sprockets.md for ERB support for React assets (*.jsx.erb).

mikecmpbll commented 1 year ago

thanks man, this was dead useful for me. i couldn't work out what was going on when i upgraded from 3 to 4, as the change in behaviour RE chained file extensions in sprockets 4 isn't clearly explained in the upgrading guide. I used the example in your PR directly and restored desired behaviour in my .jsx.erb files :).

GeekOnCoffee commented 1 year ago

Seems like something must be broken with CI / head (pull_request) as it's failing on an unrelated issue, especially since this is a documentation change