@ -4870,6 +4870,11 @@
}
},
"is-electron": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.0.tgz",
"integrity": "sha512-SpMppC2XR3YdxSzczXReBjqs2zGscWQpBIKqwXYBFic0ERaxNVgwLCHwOLZeESfdJQjX0RDvrJ1lBXX2ij+G1Q=="
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
@ -60,6 +60,7 @@
"bmp-js": "^0.1.0",
"file-type": "^12.4.1",
"idb-keyval": "^3.2.0",
"is-electron": "^2.2.0",
"is-url": "1.2.2",
"node-fetch": "^2.6.0",
"opencollective-postinstall": "^2.0.2",
@ -1,7 +1,11 @@
const isElectron = require('is-electron');
module.exports = (key) => {
const env = {};
if (typeof window === 'object') {
if (isElectron()) {
env.type = 'electron';
} else if (typeof window === 'object') {
env.type = 'browser';
} else if (typeof importScripts === 'function') {
env.type = 'webworker';