运行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下网页会刷新,但内容不改变。
轻松入门 React 开发,React Router 4 与 Webpack 2 完美升级项目
了解课程