forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
324 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-modules-amd/test/fixtures/amd/export-from-string/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 @@ | ||
export { foo as "some exports" } from "foo"; |
13 changes: 13 additions & 0 deletions
13
packages/babel-plugin-transform-modules-amd/test/fixtures/amd/export-from-string/output.js
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,13 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(_exports, "some exports", { | ||
enumerable: true, | ||
get: function () { | ||
return _foo.foo; | ||
} | ||
}); | ||
}); |
2 changes: 2 additions & 0 deletions
2
...n-transform-modules-amd/test/fixtures/amd/export-named-string-can-be-identifier/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 @@ | ||
var foo, bar; | ||
export {foo as "defaultExports", bar}; |
11 changes: 11 additions & 0 deletions
11
...n-transform-modules-amd/test/fixtures/amd/export-named-string-can-be-identifier/output.js
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,11 @@ | ||
define(["exports"], function (_exports) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = _exports.defaultExports = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports.defaultExports = foo; | ||
}); |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-modules-amd/test/fixtures/amd/export-named-string/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 @@ | ||
var foo, bar; | ||
export {foo as "default exports", bar}; |
11 changes: 11 additions & 0 deletions
11
packages/babel-plugin-transform-modules-amd/test/fixtures/amd/export-named-string/output.js
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,11 @@ | ||
define(["exports"], function (_exports) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = _exports["default exports"] = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports["default exports"] = foo; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...-transform-modules-amd/test/fixtures/amd/imports-named-string-can-be-identifier/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 @@ | ||
import { "defaultImports" as bar} from "foo"; | ||
|
||
bar; |
5 changes: 5 additions & 0 deletions
5
...-transform-modules-amd/test/fixtures/amd/imports-named-string-can-be-identifier/output.js
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,5 @@ | ||
define(["foo"], function (_foo) { | ||
"use strict"; | ||
|
||
_foo.defaultImports; | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-modules-amd/test/fixtures/amd/imports-named-string/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 @@ | ||
import {"default imports" as bar} from "foo"; | ||
|
||
bar; |
5 changes: 5 additions & 0 deletions
5
packages/babel-plugin-transform-modules-amd/test/fixtures/amd/imports-named-string/output.js
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,5 @@ | ||
define(["foo"], function (_foo) { | ||
"use strict"; | ||
|
||
_foo["default imports"]; | ||
}); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-modules-amd/test/fixtures/loose/export-from-string/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 @@ | ||
export { foo as "some exports" } from "foo"; |
7 changes: 7 additions & 0 deletions
7
packages/babel-plugin-transform-modules-amd/test/fixtures/loose/export-from-string/output.js
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,7 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports["some exports"] = void 0; | ||
_exports["some exports"] = _foo.foo; | ||
}); |
2 changes: 2 additions & 0 deletions
2
...transform-modules-amd/test/fixtures/loose/export-named-string-can-be-identifier/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 @@ | ||
var foo, bar; | ||
export {foo as "defaultExports", bar}; |
9 changes: 9 additions & 0 deletions
9
...transform-modules-amd/test/fixtures/loose/export-named-string-can-be-identifier/output.js
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 @@ | ||
define(["exports"], function (_exports) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports.bar = _exports.defaultExports = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports.defaultExports = foo; | ||
}); |
2 changes: 2 additions & 0 deletions
2
...ages/babel-plugin-transform-modules-amd/test/fixtures/loose/export-named-string/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 @@ | ||
var foo, bar; | ||
export {foo as "default exports", bar}; |
9 changes: 9 additions & 0 deletions
9
...ages/babel-plugin-transform-modules-amd/test/fixtures/loose/export-named-string/output.js
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 @@ | ||
define(["exports"], function (_exports) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports.bar = _exports["default exports"] = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports["default exports"] = foo; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...ransform-modules-amd/test/fixtures/loose/imports-named-string-can-be-identifier/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 @@ | ||
import { "defaultImports" as bar} from "foo"; | ||
|
||
bar; |
5 changes: 5 additions & 0 deletions
5
...ransform-modules-amd/test/fixtures/loose/imports-named-string-can-be-identifier/output.js
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,5 @@ | ||
define(["foo"], function (_foo) { | ||
"use strict"; | ||
|
||
_foo.defaultImports; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...ges/babel-plugin-transform-modules-amd/test/fixtures/loose/imports-named-string/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 @@ | ||
import {"default imports" as bar} from "foo"; | ||
|
||
bar; |
5 changes: 5 additions & 0 deletions
5
...ges/babel-plugin-transform-modules-amd/test/fixtures/loose/imports-named-string/output.js
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,5 @@ | ||
define(["foo"], function (_foo) { | ||
"use strict"; | ||
|
||
_foo["default imports"]; | ||
}); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-modules-umd/test/fixtures/loose/export-from-string/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 @@ | ||
export { foo as "some exports" } from "foo"; |
19 changes: 19 additions & 0 deletions
19
packages/babel-plugin-transform-modules-umd/test/fixtures/loose/export-from-string/output.js
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,19 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports", "foo"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require("foo")); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports, global.foo); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _foo) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports["some exports"] = void 0; | ||
_exports["some exports"] = _foo.foo; | ||
}); |
2 changes: 2 additions & 0 deletions
2
...transform-modules-umd/test/fixtures/loose/export-named-string-can-be-identifier/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 @@ | ||
var foo, bar; | ||
export {foo as "defaultExports", bar}; |
21 changes: 21 additions & 0 deletions
21
...transform-modules-umd/test/fixtures/loose/export-named-string-can-be-identifier/output.js
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,21 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports.bar = _exports.defaultExports = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports.defaultExports = foo; | ||
}); |
2 changes: 2 additions & 0 deletions
2
...ages/babel-plugin-transform-modules-umd/test/fixtures/loose/export-named-string/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 @@ | ||
var foo, bar; | ||
export {foo as "default exports", bar}; |
21 changes: 21 additions & 0 deletions
21
...ages/babel-plugin-transform-modules-umd/test/fixtures/loose/export-named-string/output.js
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,21 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports.bar = _exports["default exports"] = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports["default exports"] = foo; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...ransform-modules-umd/test/fixtures/loose/imports-named-string-can-be-identifier/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 @@ | ||
import { "defaultImports" as bar} from "foo"; | ||
|
||
bar; |
17 changes: 17 additions & 0 deletions
17
...ransform-modules-umd/test/fixtures/loose/imports-named-string-can-be-identifier/output.js
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,17 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["foo"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(require("foo")); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(global.foo); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) { | ||
"use strict"; | ||
|
||
_foo.defaultImports; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...ges/babel-plugin-transform-modules-umd/test/fixtures/loose/imports-named-string/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 @@ | ||
import {"default imports" as bar} from "foo"; | ||
|
||
bar; |
17 changes: 17 additions & 0 deletions
17
...ges/babel-plugin-transform-modules-umd/test/fixtures/loose/imports-named-string/output.js
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,17 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["foo"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(require("foo")); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(global.foo); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) { | ||
"use strict"; | ||
|
||
_foo["default imports"]; | ||
}); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-modules-umd/test/fixtures/umd/export-from-string/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 @@ | ||
export { foo as "some exports" } from "foo"; |
25 changes: 25 additions & 0 deletions
25
packages/babel-plugin-transform-modules-umd/test/fixtures/umd/export-from-string/output.js
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,25 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports", "foo"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require("foo")); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports, global.foo); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(_exports, "some exports", { | ||
enumerable: true, | ||
get: function () { | ||
return _foo.foo; | ||
} | ||
}); | ||
}); |
2 changes: 2 additions & 0 deletions
2
...n-transform-modules-umd/test/fixtures/umd/export-named-string-can-be-identifier/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 @@ | ||
var foo, bar; | ||
export {foo as "defaultExports", bar}; |
23 changes: 23 additions & 0 deletions
23
...n-transform-modules-umd/test/fixtures/umd/export-named-string-can-be-identifier/output.js
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 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = _exports.defaultExports = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports.defaultExports = foo; | ||
}); |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-modules-umd/test/fixtures/umd/export-named-string/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 @@ | ||
var foo, bar; | ||
export {foo as "default exports", bar}; |
23 changes: 23 additions & 0 deletions
23
packages/babel-plugin-transform-modules-umd/test/fixtures/umd/export-named-string/output.js
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 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(mod.exports); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = _exports["default exports"] = void 0; | ||
var foo, bar; | ||
_exports.bar = bar; | ||
_exports["default exports"] = foo; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...-transform-modules-umd/test/fixtures/umd/imports-named-string-can-be-identifier/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 @@ | ||
import { "defaultImports" as bar} from "foo"; | ||
|
||
bar; |
17 changes: 17 additions & 0 deletions
17
...-transform-modules-umd/test/fixtures/umd/imports-named-string-can-be-identifier/output.js
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,17 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["foo"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(require("foo")); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(global.foo); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) { | ||
"use strict"; | ||
|
||
_foo.defaultImports; | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-modules-umd/test/fixtures/umd/imports-named-string/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 @@ | ||
import {"default imports" as bar} from "foo"; | ||
|
||
bar; |
17 changes: 17 additions & 0 deletions
17
packages/babel-plugin-transform-modules-umd/test/fixtures/umd/imports-named-string/output.js
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,17 @@ | ||
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["foo"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(require("foo")); | ||
} else { | ||
var mod = { | ||
exports: {} | ||
}; | ||
factory(global.foo); | ||
global.input = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) { | ||
"use strict"; | ||
|
||
_foo["default imports"]; | ||
}); |