Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tree-shake deterministic dynamic imports (#4952)
* chore: init * feat: progress! * chore: refactor * feat: it works! * feat: support one more case * chore: update * chore: rename * chore: rename * feat: add more case * chore: improve coverage * chore: revert solo flag * chore: refactor * feat: support more case * chore: clean up * feat: support side-effect only dynamic import * chore: clean up * fix: side-effects * chore: update snapshot * chore: cleanup * chore: apply suggestions * fix: auto includeNamespaceMembers * fix: coverage missing variable * chore: assert for generated code * chore: update * chore: update test --------- Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
- Loading branch information
1 parent
5af8799
commit b79b73c
Showing
33 changed files
with
661 additions
and
90 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
9 changes: 3 additions & 6 deletions
9
test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_expected/amd/entry.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
9 changes: 3 additions & 6 deletions
9
test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_expected/cjs/entry.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,13 +1,10 @@ | ||
'use strict'; | ||
|
||
const bar = 2; | ||
Promise.resolve().then(function () { return foo$1; }); | ||
Promise.resolve().then(function () { return foo; }); | ||
|
||
const foo = 1; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
foo: foo | ||
var foo = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
|
||
exports.bar = bar; |
9 changes: 3 additions & 6 deletions
9
test/chunking-form/samples/deprecated/dynamic-import-inlining-object/_expected/es/entry.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,11 +1,8 @@ | ||
const bar = 2; | ||
Promise.resolve().then(function () { return foo$1; }); | ||
Promise.resolve().then(function () { return foo; }); | ||
|
||
const foo = 1; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
foo: foo | ||
var foo = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
|
||
export { bar }; |
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: 3 additions & 6 deletions
9
test/chunking-form/samples/dynamic-import-inlining-object/_expected/amd/entry.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
9 changes: 3 additions & 6 deletions
9
test/chunking-form/samples/dynamic-import-inlining-object/_expected/cjs/entry.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,13 +1,10 @@ | ||
'use strict'; | ||
|
||
const bar = 2; | ||
Promise.resolve().then(function () { return foo$1; }); | ||
Promise.resolve().then(function () { return foo; }); | ||
|
||
const foo = 1; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
foo: foo | ||
var foo = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
|
||
exports.bar = bar; |
9 changes: 3 additions & 6 deletions
9
test/chunking-form/samples/dynamic-import-inlining-object/_expected/es/entry.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,11 +1,8 @@ | ||
const bar = 2; | ||
Promise.resolve().then(function () { return foo$1; }); | ||
Promise.resolve().then(function () { return foo; }); | ||
|
||
const foo = 1; | ||
|
||
var foo$1 = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
foo: foo | ||
var foo = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
|
||
export { bar }; |
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
Oops, something went wrong.