webpack運(yùn)行后,提示配置對(duì)象無效,求助大牛
module.exports = {
entry: './src/script/main.js',
output: {
filename: 'bundle.js',
path: './dist/js/'
}
}
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!
這個(gè)報(bào)錯(cuò)提示是配置有問題,要怎么修改呢
2017-05-18
這個(gè)報(bào)錯(cuò)顯示的是你的文件路徑不是絕對(duì)路徑。要用到node.js的 path對(duì)路徑進(jìn)行轉(zhuǎn)換
2017-05-18
filename: './dist/js/bundle.js',