webpack運行后,提示配置對象無效,求助大牛
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!
這個報錯提示是配置有問題,要怎么修改呢
2017-05-18
path: __dirname + "/dist/js", webpack2的寫法
2020-02-16
Invalid configuration object. Webpack has been initialised using a configuration object that do
es not match the API schema.
報錯,解決不了
2018-01-25
windows系統(tǒng)下不用寫path: __dirname + "/dist/js",
你如果寫了path: __dirname + "/dist/js", 在webpack下能通過,刷新瀏覽器也不會報錯,但是瀏覽器只會顯示上一次的運行結(jié)果。
然后我將path: __dirname + "/dist/js",去掉之后又試了一下,發(fā)現(xiàn)既不報錯,瀏覽器也能正常顯示,所以path: __dirname + "/dist/js",可以不用寫。
2017-10-23
就是這個問題,搞了花了大半天時間,奶奶的,終于搞定
2017-07-28
為什么index.html的script的src 是bundle.js而不是./dist/js/bundle.js?
2017-07-24
這個視屏看了我一上午? 那個css就是裝不上
2017-07-15
我單獨打包css的時候總是失敗,該裝的我都裝了呀
2017-07-03
這個視屏是1.0版的啊 ?后續(xù)都不這樣寫了
2017-06-04
我用的win7 和教程上敲的一模一樣,出錯了。
原來win7 不能寫path:'./xxx/xxx.js' ? 應(yīng)該不寫path: ? 直接寫filename:'./xxx/xxx.js'
2017-05-25
var path = require('path');
path:path.join(__dirname,'./dist'),