Skip to content

Commit

Permalink
docs: update babel setup (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
taehwanno authored and dead-horse committed Oct 18, 2017
1 parent 43a1df8 commit 1e81ea3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/index.md
Expand Up @@ -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');
```
Expand Down

0 comments on commit 1e81ea3

Please sign in to comment.