报错如下
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",
}
2023-01-08 11:33:24
报错如下
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",
}