Commit dce5283
committed
fix: remove dead promise polyfill import
Since Hermes is the only supported JS engine and always provides a native
Promise implementation, the `else` branch in polyfillPromise.js that
imports the `promise` package via `../Promise` is dead code that can
never execute (`hasPromise()` is always true).
This dead import causes the bundler to include the entire `promise`
package (~15KB) in every app's JS bundle despite it never being used.
Remove the dead branch and the unused `polyfillGlobal` import.
Fixes #577021 parent 3a95e0e commit dce5283
1 file changed
Lines changed: 10 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 21 | + | |
| 22 | + | |
27 | 23 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
35 | 27 | | |
36 | | - | |
37 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
38 | 31 | | |
0 commit comments