You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an issue with some libraries that, instead of using process.env.NODE_ENV they use globalThis.process.env.NODE_ENV, and, and the default define behavior (not sure if it's this plugin or SWC) results in code like globalThis."development" === "development".
This is working at least when in source code in dev. Probably a mismatch from Vite at build time or optimize deps time. Please open an issue with a small repro on stackblitz on the Vite core repo
There's an issue with some libraries that, instead of using
process.env.NODE_ENV
they useglobalThis.process.env.NODE_ENV
, and, and the default define behavior (not sure if it's this plugin or SWC) results in code likeglobalThis."development" === "development"
.See: graphql/graphql-js#3928
I've tried to override this behavior using vite's
define
config option, but it doesn't seem to work.The text was updated successfully, but these errors were encountered: