node.js - webpack配置路径出错,各位大神帮忙看一下啊!!速度!!!
高洛峰
高洛峰 2017-04-17 16:23:05
0
1
485

我的文件夹路径是这样的
webpack下面包含这三个
dist src webpack.config.js

配置:
emodule.exports={

entry:'./src/script/main.js',
output:{
    path:'./dist/js',
    filename:'bundle.js'
}

}
请问路径有错吗,总是报路径错误

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
阿神

The logs have told you very clearly that the output path needs to be an absolute path.
The output directory as an absolute path (required) This is mentioned in the official documentation, and your logs also remind you that this is not an absolute path.
Correct usage:

path: path.resolve(__dirname, './dist/js')
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template