配置已經修改了,還是報錯,求知道的朋友指點一下,謝謝啦!?。?!
配置是這樣的:
var path = require('path');
var htmlWebpackPlugin=require("html-webpack-plugin");
module.exports={
entry:"./src/app.js",
output:{
path:path.resolve(__dirname, './dist'),
filename:"js/[name]-bundle.js"
},
module:{
loaders:[
{
test:/\.js$/,
loader:"babel-loader",
exclude:"./node_modules/",
options:{
"presets":["env"]
}
}
]
},
plugins:[
new htmlWebpackPlugin({
filename:"index.html",
template:"index.html",
inject:"body"
})
]
}
可是還是報錯如下:
2017-05-23
exclude : __dirname +"./node_modules/", 改變路徑。