Can't find variable: process
rubber-duck-software opened this issue · 5 comments
process is generally not defined in the browser environment. Before accessing properties on the process, we should verify process is defined
This is a node module. process always exists.
However, if it's not, your bundler might be broken.
@DetachHead yes, it does - the way all node modules properly support browsers is by working with the original node module bundler, browserify, and any other non-broken node module bundler.
Broken node module bundlers aren't the concern of package authors.
i'm using vite, which doen't add process by default and i think many other build tools behave the same. imo if a package is targeting browsers it shouldn't assume the bundler will always take care of missing node globals
That means vite is broken. Node packages that target browsers have always assumed that, and as such, that assumption is correct.
