报错如下

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

在我配置loader 的时候出现如上问题

配置文件部分如下

{
		test: /\.js/,
	        loader: "babel",
}

 

解决方法:

改为 babel-loader

并安装babel-loader

{
		test: /\.js/,
	        loader: "babel-loader",
}

相关文章:

  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案