//webpack打包:获取绝对路径时报错
const resolve = dir => path.resolve(_dirname,dir);
解决方法:webpack.config.js配置文件中----" dirname " 必须为两个下划线“_ _”,否则打包报错
例如:
//webpack打包:获取绝对路径时报错
const resolve = dir => path.resolve(_dirname,dir);
解决方法:webpack.config.js配置文件中----" dirname " 必须为两个下划线“_ _”,否则打包报错
例如: