SystemJS top-level await support (#12163)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
This commit is contained in:
1
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/not-tla/input.mjs
vendored
Normal file
1
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/not-tla/input.mjs
vendored
Normal file
@@ -0,0 +1 @@
|
||||
async () => await test;
|
||||
10
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/not-tla/output.mjs
vendored
Normal file
10
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/not-tla/output.mjs
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
async () => await test;
|
||||
}
|
||||
};
|
||||
});
|
||||
3
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/options.json
vendored
Normal file
3
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers", "transform-modules-systemjs", "syntax-top-level-await"]
|
||||
}
|
||||
3
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla-block/input.mjs
vendored
Normal file
3
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla-block/input.mjs
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
if (maybe) {
|
||||
await test;
|
||||
}
|
||||
12
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla-block/output.mjs
vendored
Normal file
12
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla-block/output.mjs
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: async function () {
|
||||
if (maybe) {
|
||||
await test;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
2
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla/input.mjs
vendored
Normal file
2
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla/input.mjs
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
await test;
|
||||
|
||||
10
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla/output.mjs
vendored
Normal file
10
packages/babel-plugin-transform-modules-systemjs/test/fixtures/tla/tla/output.mjs
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
System.register([], function (_export, _context) {
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
setters: [],
|
||||
execute: async function () {
|
||||
await test;
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user