vite build: "ReferenceError: process is not defined"
Closed this issue · 2 comments
tpluscode commented
I have a simple app which builds and works fine in dev environment. For some dependencies I had to add NodeGlobalsPolyfillPlugin({ process: true })
I found that when I build and deploy the app, I'm getting process is not defined
from the bundle...
remorses commented
that's because vite uses rollup for prod builds, you need to add a process polyfill for rollup too, in the top level plugins option
tpluscode commented
Gotcha, thanks for a lightning fast reply