File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed
Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -30,39 +30,46 @@ Note if 'babelRuntime'(see options below) is enabled then install 'babel-runtime
3030
3131# # Options
3232
33- * ` ie10` - bool (default true ) Add support for ie10.
33+ * ` ie10` - bool (default false ) Add support for ie10.
3434* ` react` - bool (default true) Enable react support.
3535* ` reactIntl` - bool (default true) Enable react-intl support.
3636* ` babelRuntime` - bool (default true) Enable [babel-plugin-transform-runtime plugin](https://babeljs.io/docs/plugins/transform-runtime).
3737* ` flow` - bool (default true) Enable flow support.
38- * ` asyncAwait` - bool (default true ) Enable async-await support (Note: need [regeneratorRuntime](https://babeljs.io/docs/plugins/transform-regenerator)).
38+ * ` asyncAwait` - bool (default false ) Enable async-await support (Note: need [regeneratorRuntime](https://babeljs.io/docs/plugins/transform-regenerator)).
3939
4040```
41- // disable ie10 support
41+ // enable ie10 support (default: disabled)
4242{
4343 presets: [
4444 [ "playlyfe", {"ie10": false}]
4545 ]
4646}
4747
48- // disable react
48+ // disable react (default: enabled)
4949{
5050 presets: [
5151 [ "playlyfe", {"react": false}]
5252 ]
5353}
5454
55- // disable babelRuntime
55+ // disable babelRuntime (default: enabled)
5656{
5757 presets: [
5858 [ "playlyfe", {"babelRuntime": false}]
5959 ]
6060}
6161
62- // disable flow support
62+ // disable flow support (default: enabled)
6363{
6464 presets: [
6565 [ "playlyfe", {"flow": false}]
6666 ]
6767}
68+
69+ // enable async-await support (default: disabled)
70+ {
71+ presets: [
72+ [ "playlyfe", {"asynAwait": true}]
73+ ]
74+ }
6875```
Original file line number Diff line number Diff line change @@ -82,8 +82,6 @@ testParseCode('Default Flow Support is enabled', {
8282 ` ,
8383} ) ;
8484
85- // NOTE: if react is enabled flow can't be disabled
86- // as react preset has no option to disable flow (see babel-preset-react)
8785testParseCode ( 'Can disable flow support' , {
8886 opts : [ { flow : false } ] ,
8987 throws : true ,
@@ -94,7 +92,7 @@ testParseCode('Can disable flow support', {
9492
9593// supports async await
9694testParseCode ( 'Async await syntax support' , {
97- opts,
95+ opts : [ { asyncAwait : true } ] ,
9896 throws : false ,
9997 code : `
10098 async function test() {
@@ -104,7 +102,7 @@ testParseCode('Async await syntax support', {
104102} ) ;
105103
106104testExecCode ( 'async await should work' , {
107- opts,
105+ opts : [ { asyncAwait : true } ] ,
108106 code : `
109107 const response = "test-request-response";
110108
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const DEFAULT_OPTS = {
55 reactIntl : true ,
66 babelRuntime : true ,
77 flow : true ,
8- asyncAwait : true ,
8+ asyncAwait : false ,
99} ;
1010
1111type Options = ?$Exact < {
You can’t perform that action at this time.
0 commit comments