docs: update babel setup (#1077)

This commit is contained in:
Taehwan, No 2017-10-18 17:22:26 +09:00 committed by Yiyu He
parent 43a1df8200
commit 1e81ea3691

View file

@ -12,10 +12,10 @@ $ node my-koa-app.js
## Async Functions with Babel
To use `async` functions in Koa in versions of node < 7.6, we recommend using [babel's require hook](http://babeljs.io/docs/usage/require/).
To use `async` functions in Koa in versions of node < 7.6, we recommend using [babel's require hook](http://babeljs.io/docs/usage/babel-register/).
```js
require('babel-core/register');
require('babel-register');
// require the rest of the app that needs to be transpiled after the hook
const app = require('./app');
```