ERROR in Entry module not found: Error: Can't resolve './src' in 'F:\vue_project\webpack_study'
使用配置文件生成bundle.js文件是出现以上错误
//webpack.config.js文件
// 用来简化操作
const path=require('path')
// 这个 配置文件,起始是一个js文件,向外暴露一个配置对象
module.export={
// 在配置文件中需要手动指定入口和出口文件
entry:path.join(__dirname,'./src/main.js'),
output:{
path:path.join(__dirname,'./dist'),//指定输出文件路径
filename:'bundle.js'//指定输出名称
}
}
使用module.exports
可能还有一些初学者会遇到像我一样的问题,希望可以带来些帮助