-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssr): resolve interlocking circular dependency issues (#15395)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
- Loading branch information
Showing
9 changed files
with
137 additions
and
50 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
13 changes: 13 additions & 0 deletions
13
playground/ssr/src/forked-deadlock/dynamic-imports/common-module.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 @@ | ||
/** | ||
* module H | ||
*/ | ||
export async function commonModuleExport() { | ||
const [{ stuckModuleExport }, { deadlockfuseModuleExport }] = | ||
await Promise.all([ | ||
import('./stuck-module'), | ||
import('./deadlock-fuse-module'), | ||
]) | ||
|
||
stuckModuleExport() | ||
deadlockfuseModuleExport() | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/ssr/src/forked-deadlock/dynamic-imports/deadlock-fuse-module.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,8 @@ | ||
import { fuseStuckBridgeModuleExport } from './fuse-stuck-bridge-module' | ||
|
||
/** | ||
* module A | ||
*/ | ||
export function deadlockfuseModuleExport() { | ||
fuseStuckBridgeModuleExport() | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/ssr/src/forked-deadlock/dynamic-imports/fuse-stuck-bridge-module.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,8 @@ | ||
import { stuckModuleExport } from './stuck-module' | ||
|
||
/** | ||
* module C | ||
*/ | ||
export function fuseStuckBridgeModuleExport() { | ||
stuckModuleExport() | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/ssr/src/forked-deadlock/dynamic-imports/middle-module.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,8 @@ | ||
import { deadlockfuseModuleExport } from './deadlock-fuse-module' | ||
|
||
/** | ||
* module Y | ||
*/ | ||
export function middleModuleExport() { | ||
void deadlockfuseModuleExport | ||
} |
8 changes: 8 additions & 0 deletions
8
playground/ssr/src/forked-deadlock/dynamic-imports/stuck-module.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,8 @@ | ||
import { middleModuleExport } from './middle-module' | ||
|
||
/** | ||
* module X | ||
*/ | ||
export function stuckModuleExport() { | ||
middleModuleExport() | ||
} |