Skip to content

Commit 31c485b

Browse files
committed
fix: revert to use process.browser
1 parent bd51302 commit 31c485b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const plugins = (options = { browser: false }) => {
4343
replace({
4444
preventAssignment: true,
4545
values: {
46-
'rollupProcess.browser': options.browser
46+
'process.browser': options.browser
4747
}
4848
}),
4949
commonjs({ extensions: ['.js', '.ts'] }),

src/parser/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ declare let require: Function;
3535
declare let global: any;
3636
declare const self: unknown;
3737
// eslint-disable-next-line @typescript-eslint/no-explicit-any
38-
declare let rollupProcess: any; // Used by @rollup/plugin-replace
38+
declare let process: any; // Used by @rollup/plugin-replace
3939

4040
const detectRandomBytes = (): RandomBytesFunction => {
41-
if (rollupProcess.browser) {
41+
if (process.browser) {
4242
if (typeof window !== 'undefined') {
4343
// browser crypto implementation(s)
4444
const target = window.crypto || window.msCrypto; // allow for IE11

0 commit comments

Comments
 (0)