Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog post: Configure Webpack Dev Server and React Hot Loader with Ruby on Rails #67

Closed
kevinold opened this issue Feb 5, 2015 · 6 comments

Comments

@kevinold
Copy link

kevinold commented Feb 5, 2015

Hi @gaearon,

I wrote the following blog post after figuring out how to get react-hot-loader setup with Rails. I'd like to add to your docs, but am not sure where to put it.

Configure Webpack Dev Server and React Hot Loader with Ruby on Rails
http://kevinold.com/2015/02/04/configure-webpack-dev-server-and-react-hot-loader-with-ruby-on-rails.html

Let me know if there is a place to submit it and I'll add a PR.

Kevin

@gaearon
Copy link
Owner

gaearon commented Feb 5, 2015

That's amazing! I'll figure out the docs structure and will add it!

@sergiocolussidev
Copy link

Nice post @kevinold , very clear.
I'm trying it with no luck that configuration in a ruby on rails project but it's in a vagrant vm.
Even I see this in the console after run it:

./app/assets/javascripts/App_wp_bundle.js  1294037       0  [emitted]  App
chunk    {0} ./app/assets/javascripts/App_wp_bundle.js (App) 1244140 [rendered]

But I cannot see the http://localhost:8080/assets/App_wp_bundle.js or where it's created.
Then http://localhost:8080/webpack-dev-server/index.html seems to not been running.
I'm sure I'm missing some point here.

@gaearon
Copy link
Owner

gaearon commented Feb 10, 2015

But I cannot see the http://localhost:8080/assets/App_wp_bundle.js or where it's created.

I don't know about Rails, but just to clarify: WebpackDevServer doesn't actually create any files, it serves them from memory.

@sergiocolussidev
Copy link

Thanks @gaearon for the clarification. Yes since the host where it's served is not working, seems to be something related to the environment I'm running this.
I don't know too much about Rails either.

@vipulnsward
Copy link

@kevinold this is amazing. Thanks for the writeup!

@petrbela
Copy link

@kevinold Great article! I actually spent several hours trying to set it up until I found your post.

One note though, if --hot is passed on the command line, it seems that setting up the plugin with new webpack.HotModuleReplacementPlugin() is not necessary. In fact, it causes stack overflow.

@gaearon gaearon closed this as completed Aug 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants