mirror of https://github.com/status-im/metro.git
[Async] Enable async/await and update UIExplorer and tests
Summary: - Enables async/await in .babelrc and transformer.js - Adds regenerator to package.json. Users still need to explicitly require the regenerator runtime -- this is so that you only pay for what you use. - Update AsyncStorage examples in UIExplorer to use async/await - Update promise tests in UIExplorer to use async/await in addition to the promise API Closes https://github.com/facebook/react-native/pull/1765 Github Author: James Ide <ide@jameside.com>
This commit is contained in:
parent
63a96af6c6
commit
7b1ffed4e7
|
@ -15,10 +15,12 @@
|
|||
"es6.properties.shorthand",
|
||||
"es6.spread",
|
||||
"es6.templateLiterals",
|
||||
"es7.asyncFunctions",
|
||||
"es7.trailingFunctionCommas",
|
||||
"es7.objectRestSpread",
|
||||
"flow",
|
||||
"react"
|
||||
"react",
|
||||
"regenerator"
|
||||
],
|
||||
"sourceMaps": false
|
||||
}
|
||||
|
|
|
@ -28,10 +28,12 @@ function transform(srcTxt, filename, options) {
|
|||
'es6.properties.shorthand',
|
||||
'es6.spread',
|
||||
'es6.templateLiterals',
|
||||
'es7.asyncFunctions',
|
||||
'es7.trailingFunctionCommas',
|
||||
'es7.objectRestSpread',
|
||||
'flow',
|
||||
'react',
|
||||
'regenerator',
|
||||
],
|
||||
sourceFileName: filename,
|
||||
sourceMaps: false,
|
||||
|
|
Loading…
Reference in New Issue