Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SystemJS top-level await support (#12163)
Co-authored-by: Hu谩ng J霉nli脿ng <jlhwung@gmail.com>
- Loading branch information
1 parent
d0d1fdb
commit 9c7d9c0
Showing
8 changed files
with
61 additions
and
4 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
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/not-tla/input.mjs
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
async () => await test; |
10 changes: 10 additions & 0 deletions
10
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/not-tla/output.mjs
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
System.register([], function (_export, _context) { | ||
"use strict"; | ||
|
||
return { | ||
setters: [], | ||
execute: function () { | ||
async () => await test; | ||
} | ||
}; | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/options.json
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["external-helpers", "transform-modules-systemjs", "syntax-top-level-await"] | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla-block/input.mjs
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if (maybe) { | ||
await test; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla-block/output.mjs
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
System.register([], function (_export, _context) { | ||
"use strict"; | ||
|
||
return { | ||
setters: [], | ||
execute: async function () { | ||
if (maybe) { | ||
await test; | ||
} | ||
} | ||
}; | ||
}); |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla/input.mjs
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
await test; | ||
|
10 changes: 10 additions & 0 deletions
10
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla/output.mjs
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
System.register([], function (_export, _context) { | ||
"use strict"; | ||
|
||
return { | ||
setters: [], | ||
execute: async function () { | ||
await test; | ||
} | ||
}; | ||
}); |