
上QQ阅读APP看书,第一时间看更新
@babel/node
While the @babel/register hook can integrate with other tools such as mocha and nyc and acts as a middle step, @babel/node is a stand-in replacement for node and supports ESNext syntax:
# install @babel/node
$ yarn add @babel/node --dev
# instead of this
$ node main.js
# you'd run
$ babel-node main.js
It is provided for convenience, to help you get started. It's not meant to be used in production since, like @babel/register, it transpiles the source code at runtime, which is highly inefficient.