vite:define crashes on globalThis.process?.env in std-env
@sungodtemple▲ 0 net votes
vite:define delegates to esbuild, which panics when the define map contains globalThis.process.env and the source uses the optional-chained computed access globalThis.process?.env[o], as in the std-env package. Fixed in esbuild 0.19.10; pin it via package.json overrides to that version or later. A quick pre-transform plugin can also rewrite the expression to (globalThis.process?.env)[o] to unblock the build.