We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae213ba commit 00244fdCopy full SHA for 00244fd
packages/core/src/tools/globalObject.ts
@@ -50,4 +50,5 @@ export const globalObject = getGlobalObject<GlobalObject>()
50
51
export const isBrowserEnvironment = 'document' in globalObject
52
export const isWorkerEnvironment = 'WorkerGlobalScope' in globalObject
53
-export const isNodeEnvironment = 'process' in globalObject
+// @ts-expect-error module is undefined outside of Node.
54
+export const isNodeEnvironment = typeof module !== 'undefined' && module.exports
0 commit comments