Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
- Loading branch information
1 parent
01380a6
commit 410c9ac
Showing
8 changed files
with
119 additions
and
20 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
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
9 changes: 9 additions & 0 deletions
9
...babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-let-const/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,9 @@ | ||
let l_foo = 1; | ||
const c_foo = 2; | ||
|
||
{ let l_foo, l_bar; const c_foo = 3; const c_bar = 4; } | ||
|
||
export { l_foo, c_foo }; | ||
|
||
export let l_bar = 4; | ||
export const c_bar = 6; |
23 changes: 23 additions & 0 deletions
23
...abel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-let-const/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,23 @@ | ||
System.register([], function (_export, _context) { | ||
"use strict"; | ||
|
||
var l_foo, c_foo, l_bar, c_bar; | ||
return { | ||
setters: [], | ||
execute: function () { | ||
_export("l_foo", l_foo = 1); | ||
|
||
_export("c_foo", c_foo = 2); | ||
|
||
{ | ||
let l_foo, l_bar; | ||
const c_foo = 3; | ||
const c_bar = 4; | ||
} | ||
|
||
_export("l_bar", l_bar = 4); | ||
|
||
_export("c_bar", c_bar = 6); | ||
} | ||
}; | ||
}); |
8 changes: 8 additions & 0 deletions
8
...orm-modules-systemjs/test/fixtures/systemjs/module-level-variable-destructuring/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,8 @@ | ||
import { x } from './x.js'; | ||
|
||
if (true) { | ||
const { x } = { x: 1 }; | ||
console.log(x); | ||
} | ||
|
||
new (class extends x {})(); |
22 changes: 22 additions & 0 deletions
22
...rm-modules-systemjs/test/fixtures/systemjs/module-level-variable-destructuring/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,22 @@ | ||
System.register(["./x.js"], function (_export, _context) { | ||
"use strict"; | ||
|
||
var x; | ||
return { | ||
setters: [function (_xJs) { | ||
x = _xJs.x; | ||
}], | ||
execute: function () { | ||
if (true) { | ||
const { | ||
x | ||
} = { | ||
x: 1 | ||
}; | ||
console.log(x); | ||
} | ||
|
||
new class extends x {}(); | ||
} | ||
}; | ||
}); |
8 changes: 8 additions & 0 deletions
8
...-plugin-transform-modules-systemjs/test/fixtures/systemjs/module-level-variable/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,8 @@ | ||
import { x } from './x.js'; | ||
|
||
if (true) { | ||
const x = 1; | ||
console.log(x); | ||
} | ||
|
||
new (class extends x {})(); |
18 changes: 18 additions & 0 deletions
18
...plugin-transform-modules-systemjs/test/fixtures/systemjs/module-level-variable/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,18 @@ | ||
System.register(["./x.js"], function (_export, _context) { | ||
"use strict"; | ||
|
||
var x; | ||
return { | ||
setters: [function (_xJs) { | ||
x = _xJs.x; | ||
}], | ||
execute: function () { | ||
if (true) { | ||
const x = 1; | ||
console.log(x); | ||
} | ||
|
||
new class extends x {}(); | ||
} | ||
}; | ||
}); |