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: 7782cb475ac2e7a51788
Version: webpack 2.4.1
Time: 771ms
Asset Size Chunks Chunk Names
bundle.js 2.95 kB 0 [emitted] main
/--------------------------------------------------------/
var webpack = require("webpack");
module.exports = {
entry: "./src/index.js",
output:{
path: "/src/js",
filename: "bundle.js",
publicPath: "/src/js",
},
devServer:{
inline: true,
contentBase: "./src",
port: 3000,
},
module:{
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: "babel-loader",
query: {
presets: ["latest","stage-0", "react"]
}
}
]
}
}
问题是在第二个版本的 webpack 中,加载器开发人员使用的一些东西被弃用了(https://github.com/webpack/loader-utils/issues/56)。包括这些东西是 babel-loader 使用的,你在配置中有
因此,传统的前沿工具要么等待,要么自己修复,要么放弃新的超级功能并使用旧的稳定版本的 webpack。