Closed iamandrewluca closed 7 years ago
This worked for me
Maybe is related to browser environment. I will add in the evening more info
I don't know why this happened. Now I can't reproduce this problem.
Sorry for reopening. I will close it for now.
I encountered same issue
I encountered same issue,but with the official code ,I can't reproduce this problem.
It is likely due to a more recent of Webpack Dev Server than the one I used in the walkthrough. I will update the tutorial asap. Sorry about that!
webpack.config.babel.js add
devServer: { headers: { 'Access-Control-Allow-Origin': 'http://localhost:8000' } }
to fix
a better aproach could be import the web port from "./src/shared/config":
import { WDS_PORT, WEB_PORT } from './src/shared/config'
// [...]
devServer: { headers: { 'Access-Control-Allow-Origin': http://localhost:${WEB_PORT}
}, },
thanks.
headers: { 'Access-Control-Allow-Origin': '*' } in webpack.config.babel.js worked. Thanks
It's fixed in the latest version of the tutorial. Thanks everyone :)
Thank you! It works for me! 🎉
Type of issue: bug
Chapter: 4 after adding HMR
If it's a bug:
Fix:
Add to
webpack.config.babel.js