自从 Babel 7 起,Babel 团队开始使用作用域包,所以你现在需要使用@babel/core而不是babel-core。 但本质上,@babel/core只是babel-core的更新版本。 这样做是为了更好地区分官方包和第三方包。
@babel/core
是babel-core
的v7
版本,因此您只需安装其中一个(如果是新依赖项,则建议安装@babel/core
)。 - MichaelDeBoey