flexdinesh / flexdinesh/browser-or-node

`node:process` free solution

Open
#27 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
251
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Some bundlers automatically polyfills global `Buffer` and `process` if they can detect it being used.
it really bugs me soooo much.

trying to import this via a cdn like: https://esm.sh/browser-or-node
is going to import both `node:process` and `node:events`. just for using `process` in the code.

i think if you use `isNode = globalThis.process?.versions?.node` then, you will be fine.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.