webpack --watch可以,但webpack-dev-server不行
来源:5-4 webpack热加载配置(下)
银白色暴风雪
2017-03-09
运行webpack --watch和webpack-dev-server都会出现
chenyifangdeMacBook-Air:ReactNews chenyifang$ webpack-dev-server --content-base src --inline --hot Project is running at http://localhost:8080/ webpack output is served from / Content not from webpack is served from /Users/chenyifang/WebstormProjects/ReactNews/src (node:981) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils. Hash: af588e777aa993715809 Version: webpack 2.2.1
说是 loaderUtils.parseQuery()接收到一个非字符串,可能有问题。
虽然这样,但是webpack --watch还是可以用的,但是webpack-dev-server下网页会刷新,但内容不改变。
写回答
4回答
-
Parry
2017-03-26
还不可以吗?要不你提交你的到 github 我下载了测试帮你看看?
00 -
Parry
2017-03-25
请参考我最新分享的解决方案:http://blog.parryqiu.com/2017/03/25/fix-webpack-dev-server-automatic-refresh/
00 -
Parry
2017-03-25
解决了吗?00 -
Parry
2017-03-09
请执行:webpack-dev-server --inline --hot
React 课程常见问题请参见我整理的博文:http://blog.parryqiu.com/2017/03/09/react-q-and-a/
052017-03-26
相似问题