Babel API example (#4675) [skip ci]
Just a minor fix. I'm new to Babel's API and this tripped me up. Seems like it happened to others before (e.g. #2859). Guessing this came from an earlier `var babel = require('babel-core')` which does work.
This commit is contained in:
parent
f5b5d8f337
commit
7977c9249e
@ -11,7 +11,7 @@ $ npm install babel-core
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import babel from 'babel-core';
|
||||
import * as babel from 'babel-core';
|
||||
|
||||
const code = `class Example {}`;
|
||||
const result = babel.transform(code, { /* options */ });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user