react+webpack在调试(npm run dev)报错

在react(vue)+webpack中的调试时,node会报如下错误信息

(node:9016) DeprecationWarning: loaderUtils.parseQuery() received a non-string v
alue which can be problematic, see https://github.com/webpack/loader-utils/issue
s/56
parseQuery() will be replaced with getOptions() in the next major version of loa
der-utils.

最终解决办法

process.noDeprecation = true

在dev-server .js中添加以上代码
var config = require('../config')
if (!process.env.NODE_ENV) {
 process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV);
 process.noDeprecation = true //添加在此位置
}

你可能感兴趣的:(react+webpack在调试(npm run dev)报错)