Read more

How to: Run webpack dev server with vcap.me

Emanuel
January 10, 2018Software engineer at makandra GmbH

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
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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 09:19)