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

更改文件不能自动刷新,并报如下错误 #11

Open
Kai-93 opened this issue Oct 10, 2017 · 2 comments
Open

更改文件不能自动刷新,并报如下错误 #11

Kai-93 opened this issue Oct 10, 2017 · 2 comments

Comments

@Kai-93
Copy link

Kai-93 commented Oct 10, 2017

XMLHttpRequest cannot load http://localhost:8081/01262bb4bd96c4ad0a55.hot-update.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.6.149:8081' is therefore not allowed access.
pagename1.bundle.js:1 [HMR] Update check failed: Error: Manifest request to http://localhost:8081/01262bb4bd96c4ad0a55.hot-update.json timed out.
at XMLHttpRequest.n.onreadystatechange (http://192.168.6.149:8081/js/pagename1.bundle.js:1:578)

@kenanpengyou
Copy link
Owner

kenanpengyou commented Oct 11, 2017

@KaiseerZ 请使用 “localhost” 而不是 “IP地址“ 来访问。
另外,也可以自行更改 webpack.config.js 里的 publicPath 实现。

@Kai-93
Copy link
Author

Kai-93 commented Oct 11, 2017

嗯嗯,两者一致就可以了,谢谢

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

2 participants