简体   繁体   English

babel-cli和@ babel / cli有什么区别?

[英]What is the difference between babel-cli and @babel/cli?

What is the difference between @babel/node and babel-node ? @babel/nodebabel-node什么区别?
I did yarn add babel-node --dev but I had error. 我做了yarn add babel-node --dev但我有错误。 So I did yarn add @babel/node --dev , it worked. 所以我做了yarn add @babel/node --dev ,它有效。 What is the meaning of @ ? @是什么意思?

The @ signifies the usage of an "npm scope": @表示使用“npm范围”:

https://docs.npmjs.com/about-scopes https://docs.npmjs.com/about-scopes

It's basically a way to avoid name clashing, so we could both own modules @cdbrouk/foo and @jedrichards/foo . 它基本上是一种避免名字冲突的方法,因此我们可以拥有模块@cdbrouk/foo@jedrichards/foo Babel moved to using the @babel scope a while ago, so the @babel/... modules are the correct ones to use. Babel @babel开始使用@babel范围,所以@babel/...模块是正确使用的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM