Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refine esbuild & node detection (#2677)
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.
- Loading branch information