Skip to content

Commit

Permalink
build(babel): install transform-async-to-generator and transform-runtime
Browse files Browse the repository at this point in the history
enable support for es2017, like async-await
  • Loading branch information
aneurysmjs committed Jan 2, 2018
1 parent 5672d3d commit aaa65ed
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
},
"plugins": [
// es2015 preset, manual version:
// ES2015 preset, manual version:
"transform-es2015-arrow-functions",
"transform-es2015-block-scoped-functions",
"transform-es2015-block-scoping",
Expand All @@ -28,12 +28,14 @@
"transform-es2015-typeof-symbol",
"transform-es2015-unicode-regex",
//"transform-regenerator", // not needed in Chrome or Firefox. Soon won't be needed in Edge or Safari.
//"transform-async-to-generator",
"transform-es5-property-mutators",
// module support
//"transform-es2015-modules-amd",
"transform-es2015-modules-commonjs",
//"transform-es2015-modules-systemjs", // needs System existing in global scope first (f.e. via SystemJS)
"transform-es2015-modules-umd"
"transform-es2015-modules-umd",
// ES017
"transform-runtime", // to make async/await work
"transform-async-to-generator" // to use async/await
]
}
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"babel-plugin-transform-es2015-unicode-regex": "6.24.1",
"babel-plugin-transform-es5-property-mutators": "6.24.1",
"babel-plugin-transform-regenerator": "6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "1.6.0",
"babel-preset-react": "6.24.1",
"babel-register": "6.26.0",
Expand Down
20 changes: 13 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -398,20 +398,20 @@ aws4@^1.2.1, aws4@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"

[email protected]:
version "0.17.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.17.1.tgz#2d8e3e5d0bdbd7327f91bc814f5c57660f81824d"
dependencies:
follow-redirects "^1.2.5"
is-buffer "^1.1.5"

axios@^0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.16.2.tgz#ba4f92f17167dfbab40983785454b9ac149c3c6d"
dependencies:
follow-redirects "^1.2.3"
is-buffer "^1.1.5"

axios@^0.17.1:
version "0.17.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.17.1.tgz#2d8e3e5d0bdbd7327f91bc814f5c57660f81824d"
dependencies:
follow-redirects "^1.2.5"
is-buffer "^1.1.5"

babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
Expand Down Expand Up @@ -861,6 +861,12 @@ [email protected], babel-plugin-transform-regenerator@^6
dependencies:
regenerator-transform "^0.10.0"

babel-plugin-transform-runtime@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
dependencies:
babel-runtime "^6.22.0"

babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
Expand Down

0 comments on commit aaa65ed

Please sign in to comment.