Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.output.path: The provided value "./dist/js" is not an absolute path! 请问老师, 这个报错是为啥啊?这是我在执行wekpack时候出现的
路径改成这样,为什么还报错。报错提示bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
代码如下:请指点下
var path=require("path");
module.exports={
entry:"./src/js/app.js",
output:{
path:__dirname+"/dist",
filename:"bundle.js"
},
module:{
loaders:[
{test:/\.css$/,loader:"style-loader!css-loader"}
]
}
}
在webpack.config.js文件里面引入:
var path = require("path");
output参数中path改成:
path : path.resolve(__dirname,'./dist/js'),