Skip to content

Commit 6bbd7b9

Browse files
committed
Polyfill 'process' in the browser
1 parent 66fa3f0 commit 6bbd7b9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/browser/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import { ConnectTokenProvider, TokenCallback } from "../core/auth/index.js";
99
import { type Account, type App, PipedreamClient as BackendClient, PipedreamEnvironment } from "../index.js";
1010
import { PipedreamClientOpts as BackendClientOpts } from "../wrapper/Pipedream.js";
1111

12+
if (typeof process === "undefined") {
13+
// We're in the browser
14+
globalThis.process ||= {
15+
env: {},
16+
} as NodeJS.Process;
17+
}
18+
1219
/**
1320
* Options for creating a browser-side client. This is used to configure the
1421
* PipedreamClient instance.

0 commit comments

Comments
 (0)