Commit 904bfc2
committed
chore: refine esbuild & node detection
When using the loader for external builtins, `esbuildDetection` is
undefined. This commit defines `__UNDICI_IS_NODE__` on `globalThis`
in the loader and deletes it after loading Undici. `esbuildDetection`
has also been extracted as a variable at the top level of the module,
to support deleting `__UNDICI_IS_NODE__` on `globalThis` to avoid
polluting the global namespace.1 parent 0808a72 commit 904bfc2
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
| 106 | + | |
105 | 107 | | |
106 | 108 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
1473 | 1477 | | |
1474 | 1478 | | |
1475 | 1479 | | |
1476 | | - | |
| 1480 | + | |
1477 | 1481 | | |
1478 | 1482 | | |
1479 | 1483 | | |
| |||
0 commit comments