絕對(duì)路徑問題
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! 請(qǐng)問老師, 這個(gè)報(bào)錯(cuò)是為啥???這是我在執(zhí)行wekpack時(shí)候出現(xiàn)的
2017-09-23
路徑改成這樣,為什么還報(bào)錯(cuò)。報(bào)錯(cuò)提示bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
代碼如下:請(qǐng)指點(diǎn)下
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"}
? ]
}
}
2017-08-12
在webpack.config.js文件里面引入:
var path = require("path");
output參數(shù)中path改成:
path : path.resolve(__dirname,'./dist/js'),