docs: update babel setup (#1077)
This commit is contained in:
parent
43a1df8200
commit
1e81ea3691
1 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue