Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toStringTag to dynamic entries and interop helpers
- Loading branch information
1 parent
0b2390a
commit 20cbac1
Showing
49 changed files
with
617 additions
and
48 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
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
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
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
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
10 changes: 10 additions & 0 deletions
10
test/chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_config.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,10 @@ | ||
module.exports = { | ||
description: | ||
'adds Symbol.toStringTag property to dynamic imports of entry chunks with default export mode', | ||
options: { | ||
input: ['main', 'foo'], | ||
output: { | ||
namespaceToStringTag: true | ||
} | ||
} | ||
}; |
7 changes: 7 additions & 0 deletions
7
...chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/amd/foo.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(function () { 'use strict'; | ||
|
||
var foo = 42; | ||
|
||
return foo; | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
...hunking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/amd/main.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(['require'], function (require) { 'use strict'; | ||
|
||
function _interopNamespaceDefaultOnly(e) { | ||
return Object.freeze({__proto__: null, [Symbol.toStringTag]: 'Module', 'default': e}); | ||
} | ||
|
||
new Promise(function (resolve, reject) { require(['./foo'], function (m) { resolve(/*#__PURE__*/_interopNamespaceDefaultOnly(m)); }, reject) }).then(console.log); | ||
|
||
}); |
5 changes: 5 additions & 0 deletions
5
...chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/cjs/foo.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 @@ | ||
'use strict'; | ||
|
||
var foo = 42; | ||
|
||
module.exports = foo; |
7 changes: 7 additions & 0 deletions
7
...hunking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/cjs/main.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 @@ | ||
'use strict'; | ||
|
||
function _interopNamespaceDefaultOnly(e) { | ||
return Object.freeze({__proto__: null, [Symbol.toStringTag]: 'Module', 'default': e}); | ||
} | ||
|
||
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('./foo.js')); }).then(console.log); |
3 changes: 3 additions & 0 deletions
3
.../chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/es/foo.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,3 @@ | ||
var foo = 42; | ||
|
||
export default foo; |
1 change: 1 addition & 0 deletions
1
...chunking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/es/main.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 @@ | ||
import('./foo.js').then(console.log); |
10 changes: 10 additions & 0 deletions
10
...nking-form/samples/namespace-tostring/dynamic-import-default-mode/_expected/system/foo.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,10 @@ | ||
System.register([], function (exports) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
var foo = exports('default', 42); | ||
|
||
} | ||
}; | ||
}); |
Oops, something went wrong.