Hot module replacement for Silhouette Play React Seed Template doesn't work


#1

Hi First of all thanks for creating this Silhouette Play React Seed Template, this is really handy and save me time on scarfolding.

I cloned the template from https://github.com/setusoft/silhouette-play-react-seed. I started it by running sbt run, the applications starts and I can login/ sign up. However when I make changes to /silhouette-play-react-seed/app-ui/src/routes/Admin/components/Dashboard/Dashboard.jsx. the change didn’t trigger a module reload. Just wondering did I done anything wrong?
I’m running Ubuntu 16 and my google chrome version is Version 61.0.3163.79 (Official Build) (64-bit)

Btw sbt test runs all test successfully but just hangs at the end.


#2

Hi,

You’re welcome :+1:

Yes I’ve the same issue. Sometimes it works and sometimes it doesn’t work. I hadn’t the time to dive deeper into the issue. Let me know if you find a solution for the issue.

Best regards,
Christian


#3

Thanks Christian. I’ll give it a go.


#4

Hi,

today I stumbled over a CORS issue in my application where the webpack-dev-server needs "Access-Control-Allow-Origin": "*" header set.

By searching how this could be set I’ve found the two following issues:
https://github.com/gaearon/react-hot-loader/issues/56
https://github.com/webpack/webpack-dev-server/issues/533#issuecomment-296381317

Today I updated webpack-dev-server from 2.4.1 to 2.4.3 and suddenly HMR stopped working until I added this to my webpack config file:

Could you please change the line:

To:

['neutrino-preset-react', {
  devServer: {
    headers: {
      "Access-Control-Allow-Origin": "*",
    }
  },
}],

#5

@ryan_Li Does it work for you?


#6

Hi Akkie,
sorry didn’t get a chance to reply. I pulled the master a few days ago and HMR works after that so i assume thw fix worked for me.

Thanks for fixing that.