-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to babel@7 and support TypeScript
- Loading branch information
Showing
3 changed files
with
858 additions
and
910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
{ | ||
"presets": ["es2015"], | ||
"plugins": [ | ||
"transform-class-properties", | ||
|
||
// this transforms async functions into generator functions, which | ||
// are then made to use the regenerator module by babel's | ||
// transform-regnerator plugin (which is enabled by es2015). | ||
"transform-async-to-bluebird", | ||
|
||
// This makes sure that the regenerator runtime is available to | ||
// the transpiled code. | ||
"transform-runtime", | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"browsers": ["last 2 versions"], | ||
"node": 10 | ||
}, | ||
"modules": "commonjs" | ||
}], | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-numeric-separator", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-object-rest-spread", | ||
"@babel/plugin-syntax-dynamic-import", | ||
["@babel/plugin-transform-async-to-generator", { | ||
"module": "bluebird", | ||
"method": "coroutine" | ||
}], | ||
"@babel/plugin-transform-runtime" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.