Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More experimental bundler fixes (#7783)
* internalization bug * Cleanup * Always add assets to reachable bundles * cleanup * fixed test regressions * add ref edges whenever there are bundle edges * add edge from bundlegroups to bundles wip * * Get inline bundles in bundle group in HTML packager * Traverse each bundle instead of iterating each outbound node * Add edge between root and bundle * use and follow reference edges again * set env whenever we create bundles * Check to add parallel edges from all paths to an asset from a bundle * Always register referenced bundles before pruning when building bundle manifest * Revert "set env whenever we create bundles" This reverts commit 73ad828. * Add test for referenced roots in bundle manifest * Add reused sibling bundles to asyncBundleRootGraph * Add test case for asset that has both an async and sync import * ExperimentalBundler: stop at isolated bundles * ExperimentalBundler: fix step 7 comment * ExperimentalBundler: initialize entry bundles with no ancestors * ExperimentalBundler: accept shared bundles extracted from workers * Remove unused async bundles if needed * Scope-hositing with new bundler: allow less duplication * Uncomment line in getSymbolResolution * Consider sibling availability before removing from ancestorAssets * Uncomment line in getSymbolResolution * Upgrade flow to 0.173.0 (#7809) * Remove reachableBundles * Bump lmdb (#7797) * Replace typeof before DCE (#7788) * Consider sibling availability before removing from ancestorAssets * Consider assets in siblings before duplicating * Remove unrelated change * Don't consider any of parent's async bundles as sibling * Remove unused structure * remove eager bundle reuse and related lending code * Alter tests with mode production and correct assets with logic for splittable bundles * Skip unused dependencies in experimental bundler * Implement getBundleFromBundleRoot * Only add dependencies to CSS module JS, not CSS * Handle multiple assets on dependencies in reachability * ScopeHoistingPackager: Handle different wrapped ancestries in wrapping dfs * skip assets for reachable if isolated or inline fix invariant * Use bundleGroup instead of bundle root for determining needsStableName * Add bundle.mainEntryAsset * fixup! Add bundle.mainEntryAsset Co-authored-by: Gora Kong <gora.kong1@gmail.com> Co-authored-by: Will Binns-Smith <wbinnssmith@atlassian.com> Co-authored-by: Eric Eldredge <lettertwo@gmail.com> Co-authored-by: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com> Co-authored-by: Agnieszka Gawrys <agawrys@atlassian.com> Co-authored-by: Devon Govett <devongovett@gmail.com>
- Loading branch information
1 parent
e68beeb
commit 38bb2ee
Showing
22 changed files
with
230 additions
and
281 deletions.
There are no files selected for viewing
363 changes: 116 additions & 247 deletions
363
packages/bundlers/experimental/src/ExperimentalBundler.js
Large diffs are not rendered by default.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/html-shared-referenced/async.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 @@ | ||
import './async2.js'; | ||
|
||
import('./async2.js'); |
Empty file.
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-shared-referenced/index1.html
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 @@ | ||
<script type="module" src="index1.js"></script> |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-shared-referenced/index1.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 './shared'; |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-shared-referenced/index2.html
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 @@ | ||
<script type="module" src="index2.js"></script> |
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/html-shared-referenced/index2.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 @@ | ||
import './async.js'; | ||
import './shared.js'; | ||
|
5 changes: 5 additions & 0 deletions
5
packages/core/integration-tests/test/integration/html-shared-referenced/package.json
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 @@ | ||
{ | ||
"@parcel/bundler-default": { | ||
"minBundleSize": 0 | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-shared-referenced/shared.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('./async.js'); |
Empty file.
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-sync-async-asset/index.html
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 @@ | ||
<script type="module" src="./index.js"></script> |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/html-sync-async-asset/index.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,4 @@ | ||
import t from "./test.js"; | ||
|
||
import("./other.js") | ||
.then((v) => v.default) |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-sync-async-asset/other.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 @@ | ||
export default import("./test.js"); |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/html-sync-async-asset/test.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 @@ | ||
export default "test"; |
6 changes: 6 additions & 0 deletions
6
...ests/test/integration/scope-hoisting/es6/export-intermediate-wrapped-reexports/index.html
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,6 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<script type="module" src="./index.mjs"></script> | ||
</body> | ||
</html> |
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