Skip to content

Commit 6e18b2a

Browse files
committed
Support async/await
1 parent d5ebaeb commit 6e18b2a

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

config/babel.dev.js

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module.exports = {
2424
plugins: [
2525
// function x(a, b, c,) { }
2626
require.resolve('babel-plugin-syntax-trailing-function-commas'),
27+
// await fetch()
28+
require.resolve('babel-plugin-transform-async-to-generator'),
2729
// class { handleClick = () => { } }
2830
require.resolve('babel-plugin-transform-class-properties'),
2931
// { ...todo, completed: true }

config/babel.prod.js

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ module.exports = {
2121
plugins: [
2222
// function x(a, b, c,) { }
2323
require.resolve('babel-plugin-syntax-trailing-function-commas'),
24+
// await fetch()
25+
require.resolve('babel-plugin-transform-async-to-generator'),
2426
// class { handleClick = () => { } }
2527
require.resolve('babel-plugin-transform-class-properties'),
2628
// { ...todo, completed: true }

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"babel-eslint": "6.1.2",
3333
"babel-loader": "6.2.5",
3434
"babel-plugin-syntax-trailing-function-commas": "6.13.0",
35+
"babel-plugin-transform-async-to-generator": "6.8.0",
3536
"babel-plugin-transform-class-properties": "6.11.5",
3637
"babel-plugin-transform-object-rest-spread": "6.8.0",
3738
"babel-plugin-transform-react-constant-elements": "6.9.1",

0 commit comments

Comments
 (0)