为了账号安全,请及时绑定邮箱和手机立即绑定

Module build failed: Error: The node API for `babel` has been moved to `babel-core`.

Module build failed: Error: The node API for `babel` has been moved to `babel-core`.

.pipe(gulpwebpack({module:{loaders:[{test:/\.js$/,loader:'babel'}]}}),null,(err,stats)=>{log(`Finished '${color.cyan('scripts')}'`,stats.toString({chunks:false}))})重新编译是loader:'babel'会出现Module build failed: Error: The node API for `babel` has been moved to `babel-core`.这样的错误提示,这是怎么回事?改成loader:'babel-loader'又好了
查看完整描述

1 回答

?
Caballarii

TA贡献1123条经验 获得超629个赞

babel的库被拆分了,以前的写法是babel,最新版本需要用babel的loader的话要写成babel-loader。版本问题,你看的教程太老了

查看完整回答
6 反对 回复 2017-08-17
  • 1 回答
  • 0 关注
  • 5068 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信