Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instanceOf: workaround bundler issue with
process.env
Fixes: #3919 #3920 #3921 Context: #3887 changed code and introced optinal chaining. `globalThis.process?.env.NODE_ENV` is transpiled into ``` (_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 ? void 0 : _globalThis$process.env.NODE_ENV; ``` Bundlers incorrectly replace (probably RegExp) `process.env.NODE_ENV` with `"development"` resulting in: ``` (_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 ? void 0 : _globalThis$"development"; ``` Technically it's not a graphql issue but an issue with bundler but since it caused so much pain in comutinity this is an attempt to fix it within our codebase.
- Loading branch information