Shopify / sprockets-commoner

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

[HELP] Support for react-rails #23

Closed 3den closed 8 years ago

3den commented 8 years ago

I am having a lot of trouble to get this gem to work with server side rendering on react-rails, also seems like first rendering after reload seems very slow. I there some way to get react rails to work with this?

3den commented 8 years ago

@bouk where did the es2015 preset worked well in your project? The spread ... operator did not work on my project, after adding "plugins": ["transform-es2015-spread"] assets:precompile works but on the front end i get an error...

bouk commented 8 years ago

This gem is pretty much incompatible with react-rails, as react-rails also does transpilation of JavaScript, which will probably mess with this gem. Server-side rendering is also not something that this gem supports

bouk commented 8 years ago

Going to close this as react-rails is fundamentally incompatible with this gem. Something akin to it could be build on top of this gem, however.

3den commented 8 years ago

@bouk I was able to get react-rails to work fine, even the server side render, my only issue now is because i have to run assets:precompile and restart the server for every javascript change.