老師你好 我按照你的視頻教程打包完了 有個bug
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!
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!
2018-12-18
舉報
2019-06-23
提示已經很明顯的告訴你,你的path不支持相對路徑,希望path屬性是一個絕對路徑,引入
var path = require('path');
配置output: {
????path: path.resolve(__dirname, './dist/js'),
}
就可以了,官網上面有具體的實例,建議遇到問題可以先看提示,再看官網是否有解決方法。不行自己再嘗試解決,再不行再問
2019-04-06
是的,會報錯Error: EACCES: permission denied, mkdir '/XXXX'
2019-03-12
const path = require('path')
module.exports = {
?entry: './src/script/main.js',
?output: {
? ?path: path.resolve('dist/js'),
? ?filename: 'bundle.js'
?}
}
2018-12-19
webpack4吧, 現在版本的webpack入口和出口需要使用絕對路徑 使用path.resolve(__dirname, 'dist/....')這樣的。不能使用相對路徑。