With webpack 3.3.1 this is not required anymore. Do not start the webpack-dev-server manually, but only start rails which take care of webpack-dev-server under the hood.
If your Rails application is using Webpack you need to serve assets on the same host as you application runs, otherwise you will see the following errors in your browser console:
[WDS] Disconnected!
Invalid Host header
So if you are using awesome.vcap.me:3000
you need to start the webpack-dev-server
with a different host than localhost (0.0.0.0
):
bin/webpack-dev-server --host awesome.vcap.me
Posted by Emanuel to makandra dev (2018-01-10 08:19)