为什么使用'./dist'目录会出现下面的报错?
output: {
path: './dist',
filename: 'js/[name]-[hash].js'
// filename: 'bundle.js'
},
报错信息:configuration.output.path: The provided value "dist" is not an absolute path!
改为这样写却 不报错?
output: {
path: path.resolve(__dirname, 'dist'),
// path: './dist',
filename: 'js/[name]-[hash].js'
// filename: 'bundle.js'
},
4.32.2的版本,需要用绝对路径,引入path