babel vs babel-core vs babel-runtime [英] babel vs babel-core vs babel-runtime
本文介绍了babel vs babel-core vs babel-runtime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的节点webpack项目使用三个babel库.这些和如何使用有什么区别?
My node webpack project uses three babel libraries. What's the difference between these and how are they being used?
"dependencies": {
"babel-runtime": "^5.8.24"
}
"dev-dependencies": {
"babel": "^5.8.23",
"babel-core": "^5.8.23"
}
推荐答案
babel-core
是API.对于v5,babel
程序包是CLI,并且取决于babel-core
.对于v6,babel-cli
程序包是CLI(尽管CLI bin命令仍然是babel
),而babel
程序包不执行任何操作. babel-runtime
我想这只是运行时(polyfill和助手)来支持已经转换的代码.
babel-core
is the API. For v5 the babel
package is the CLI and depends on babel-core
. For v6, the babel-cli
package is the CLI (the CLI bin command is still babel
though) and the babel
package doesn't do anything. babel-runtime
I guess is just the runtime (polyfill and helpers) to support code that's already been transformed.
这篇关于babel vs babel-core vs babel-runtime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文