Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: detect process before use (#172)
Access process as a property of `globalThis` instead of as a global as parcel has stopped bundling the polyfill. Fixes: ``` ipfs: @parcel/core: Failed to resolve 'process' from ipfs: './node_modules/ipfs-utils/src/env.js' ipfs: /tmp/test-dependant-1646117523100/node_modules/ipfs-utils/src/env.js:10:57 ipfs: 9 | const IS_ELECTRON_RENDERER = IS_ELECTRON && IS_ENV_WITH_DOM ipfs: > 10 | peof process !== 'undefined' && typeof process.release !== 'undefined' ipfs: > | ^^^^^^^ ipfs: 11 | // @ts-ignore - we either ignore worker scope or dom scope ipfs: 12 | const IS_WEBWORKER = typeof importScripts === 'function' && typeof self ipfs: @parcel/resolver-default: Node builtin polyfill "process" is not installed, but ipfs: auto install is disabled. ```
- Loading branch information