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

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

Closed
leogout opened this issue May 16, 2017 · 2 comments
Closed

Comments

@leogout
Copy link

leogout commented May 16, 2017

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: gaearon/react-hot-loader#56
My configuration:

  • Brand new Symfony 3.2.8
  • Running on 127.0.0.1:8000 (php bin/console server:start)
  • Running php bin/console maba:webpack:dev-server

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
Copy link

m-albo commented May 19, 2017

+1 Thx @leogout for this fix!

@mariusbalcytis
Copy link
Owner

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.

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

3 participants