Commit 0867ff0
committed
[Flight] Instrument the Promise for Async Module instead of using a Module Cache (#26985)
Currently, since we use a module cache for async modules, it doesn't
automatically get updated when the module registry gets updated (HMR).
This technique ensures that if Webpack replaces the module (HMR) then
we'll get the new Promise when we require it again.
This technique doesn't work for ESM and probably not Vite since ESM will
provide a new Promise each time you call `import()` but in the
Webpack/CJS approach this Promise is an entry in the module cache and
not a promise for the entry.
I tried to replicate the original issue in the fixture but it's tricky
to replicate because 1) we can't really use async modules the same way
without compiling both server and client 2) even then I'm not quite sure
how to repro the HMR issue.
DiffTrain build for commit 5945e06.1 parent 161c5ae commit 0867ff0
File tree
7 files changed
+9
-9
lines changed- compiled-rn/facebook-fbsource/xplat/js
- RKJSModules/vendor
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
7 files changed
+9
-9
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23991 | 23991 | | |
23992 | 23992 | | |
23993 | 23993 | | |
23994 | | - | |
| 23994 | + | |
23995 | 23995 | | |
23996 | 23996 | | |
23997 | 23997 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8646 | 8646 | | |
8647 | 8647 | | |
8648 | 8648 | | |
8649 | | - | |
| 8649 | + | |
8650 | 8650 | | |
8651 | 8651 | | |
8652 | 8652 | | |
| |||
8677 | 8677 | | |
8678 | 8678 | | |
8679 | 8679 | | |
8680 | | - | |
| 8680 | + | |
8681 | 8681 | | |
8682 | 8682 | | |
8683 | 8683 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9072 | 9072 | | |
9073 | 9073 | | |
9074 | 9074 | | |
9075 | | - | |
| 9075 | + | |
9076 | 9076 | | |
9077 | 9077 | | |
9078 | 9078 | | |
| |||
9103 | 9103 | | |
9104 | 9104 | | |
9105 | 9105 | | |
9106 | | - | |
| 9106 | + | |
9107 | 9107 | | |
9108 | 9108 | | |
9109 | 9109 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
| 626 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments