rmosolgo / react-rails-hot-loader

Live-reload React.js components with Ruby on Rails & react-rails
MIT License
88 stars 24 forks source link

When used with browserify and react I see [Log] [HotLoader] SyntaxError: Unexpected use of reserved word 'import' #5

Open gugl opened 9 years ago

gugl commented 9 years ago

Hi,

First of all, thanks for the great gem. Although I see that the changed component code is sent to the browser I get an error in the browser console log: [Log] [HotLoader] SyntaxError: Unexpected use of reserved word 'import'

I'm using a setup similar to https://github.com/suzan2go/react-rails-redux-sample and it looks like there is missing a babel step before the hot-loader sends the updated file to the browser. The reails-redux setup works now I want to get it working with hot loading changes.

Any hint on how to go forward would be very helpful. Thanks.

rmosolgo commented 8 years ago

There was a bug with Sprockets 3 which I fixed in #8, you could try again after that fix!

Sorry I didn't have much to say before -- this gem leans heavily on Sprockets and I don't know the other build systems very well!