Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always render and use a dynamic namespace when a module with syntheti…
…c named exports is imported dynamically
- Loading branch information
1 parent
ee6ef99
commit 8173e69
Showing
151 changed files
with
241 additions
and
156 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
5 changes: 0 additions & 5 deletions
5
...les/synthetic-named-exports-chained-default-reexport/_expected/amd/generated-component.js
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...les/synthetic-named-exports-chained-default-reexport/_expected/cjs/generated-component.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ples/synthetic-named-exports-chained-default-reexport/_expected/es/generated-component.js
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
.../synthetic-named-exports-chained-default-reexport/_expected/system/generated-component.js
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...orm/samples/synthetic-named-exports-default-reexport/_expected/amd/generated-component.js
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...orm/samples/synthetic-named-exports-default-reexport/_expected/cjs/generated-component.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...form/samples/synthetic-named-exports-default-reexport/_expected/es/generated-component.js
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
test/chunking-form/samples/synthetic-named-exports-default-reexport/_expected/es/main.js
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
.../samples/synthetic-named-exports-default-reexport/_expected/system/generated-component.js
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
test/chunking-form/samples/synthetic-named-exports/_config.js
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
test/chunking-form/samples/synthetic-named-exports/_expected/amd/main.js
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
test/chunking-form/samples/synthetic-named-exports/_expected/cjs/main.js
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
test/chunking-form/samples/synthetic-named-exports/_expected/es/main.js
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
test/chunking-form/samples/synthetic-named-exports/_expected/system/main.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
...les/synthetic-named-exports/chained-default-reexport/_expected/amd/generated-component.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', './generated-main'], function (exports, main) { 'use strict'; | ||
|
||
var component = { lib: main.lib, lib2: main.lib.named, lib3: main.lib.named.named }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
|
||
exports.component = component$1; | ||
|
||
}); |
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
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
...les/synthetic-named-exports/chained-default-reexport/_expected/cjs/generated-component.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 @@ | ||
'use strict'; | ||
|
||
var main = require('./generated-main.js'); | ||
|
||
var component = { lib: main.lib, lib2: main.lib.named, lib3: main.lib.named.named }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
|
||
exports.component = component$1; |
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
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...ples/synthetic-named-exports/chained-default-reexport/_expected/es/generated-component.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 @@ | ||
import { l as lib } from './generated-main.js'; | ||
|
||
var component = { lib, lib2: lib.named, lib3: lib.named.named }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
|
||
export { component$1 as c }; |
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
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
.../synthetic-named-exports/chained-default-reexport/_expected/system/generated-component.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 @@ | ||
System.register(['./generated-main.js'], function (exports) { | ||
'use strict'; | ||
var lib; | ||
return { | ||
setters: [function (module) { | ||
lib = module.l; | ||
}], | ||
execute: function () { | ||
|
||
var component = { lib, lib2: lib.named, lib3: lib.named.named }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
exports('c', component$1); | ||
|
||
} | ||
}; | ||
}); |
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...rts-chained-default-reexport/component.js → ...rts/chained-default-reexport/component.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import lib from './lib'; | ||
import lib2 from './lib-reexport2'; | ||
import lib3 from './lib-reexport'; | ||
console.log(lib, lib2, lib3); | ||
export default { lib, lib2, lib3 }; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
...orm/samples/synthetic-named-exports/default-reexport/_expected/amd/generated-component.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', './main'], function (exports, main) { 'use strict'; | ||
|
||
var component = { lib: main.lib, someExport: main.lib.someExport }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
|
||
exports.component = component$1; | ||
|
||
}); |
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
11 changes: 11 additions & 0 deletions
11
...orm/samples/synthetic-named-exports/default-reexport/_expected/cjs/generated-component.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 @@ | ||
'use strict'; | ||
|
||
var main = require('./main.js'); | ||
|
||
var component = { lib: main.lib, someExport: main.lib.someExport }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
|
||
exports.component = component$1; |
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
...form/samples/synthetic-named-exports/default-reexport/_expected/es/generated-component.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 @@ | ||
import { lib } from './main.js'; | ||
|
||
var component = { lib, someExport: lib.someExport }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
|
||
export { component$1 as c }; |
7 changes: 7 additions & 0 deletions
7
test/chunking-form/samples/synthetic-named-exports/default-reexport/_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,7 @@ | ||
var lib = {}; | ||
|
||
console.log('side-effect', lib); | ||
|
||
const component = import('./generated-component.js').then(function (n) { return n.c; }); | ||
|
||
export { component, lib }; |
19 changes: 19 additions & 0 deletions
19
.../samples/synthetic-named-exports/default-reexport/_expected/system/generated-component.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 @@ | ||
System.register(['./main.js'], function (exports) { | ||
'use strict'; | ||
var lib; | ||
return { | ||
setters: [function (module) { | ||
lib = module.lib; | ||
}], | ||
execute: function () { | ||
|
||
var component = { lib, someExport: lib.someExport }; | ||
|
||
var component$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), component, { | ||
'default': component | ||
})); | ||
exports('c', component$1); | ||
|
||
} | ||
}; | ||
}); |
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
2 changes: 1 addition & 1 deletion
2
...med-exports-default-reexport/component.js → ...med-exports/default-reexport/component.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import lib, { someExport } from './lib-reexport'; | ||
console.log(lib, someExport); | ||
export default { lib, someExport }; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
test/chunking-form/samples/synthetic-named-exports/dynamic-import/_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,15 @@ | ||
module.exports = { | ||
description: 'synthetic named exports', | ||
options: { | ||
input: ['main.js'], | ||
plugins: [ | ||
{ | ||
transform(code, id) { | ||
if (id.endsWith('dep.js')) { | ||
return { code, syntheticNamedExports: true }; | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}; |
Oops, something went wrong.