mariusbalcytis / webpack-bundle

Bundle to Integrate Webpack into Symfony
MIT License
122 stars 36 forks source link

Add the option "Access-Control-Allow-Origin" to the devServer config #62

Closed leogout closed 7 years ago

leogout commented 7 years ago

Hi, I had to add headers: { 'Access-Control-Allow-Origin': '*' }, to the devServer section in webpack.config.js in order to get the hot reload to work. This was the error message: capture du 2017-05-16 14-06-42 I found the solution on this issue: https://github.com/gaearon/react-hot-loader/issues/56 My configuration:

If this solution suits you, i can make a PR.

Thanks for your work, you are saving me a lot of time !

Cheers.

m-albo commented 7 years ago

+1 Thx @leogout for this fix!

mariusbalcytis commented 7 years ago

Thanks for the fix!

I've also found some related changes needed for newer webpack-dev-server in case it's ran on another host, added needed configuration parameters to readme.