我的文件夹路径是这样的
webpack下面包含这三个
dist src webpack.config.js
配置:
emodule.exports={
entry:'./src/script/main.js',
output:{
path:'./dist/js',
filename:'bundle.js'
}
}
请问路径有错吗,总是报路径错误
阿神2017-04-17 16:25:05
日誌都跟你講的很清楚了output的path需要是個絕對路徑
The output directory as an absolute path (required) 這是官方文檔裡講的,你的日誌裡也提示你了這不是一個絕對路徑。
正確用法:
path: path.resolve(__dirname, './dist/js')