I believe the current check to determine if we are in node or browser:
if (typeof module !== "undefined" && module.require && !(typeof process !== "undefined" && process.versions["electron"])) {
// We are on node.js
....
is flagging both the electron main and renderer processes as browser, causing request calls made from the main process (node) to fail with XMLHttpRequest is not defined
After modifying the check as advised by this comment to the following:
if (typeof module !== "undefined" && module.require && !(typeof navigator !== "undefined" && /electron/i.test(navigator.userAgent))) {
request calls made from either process work as expected
I don't have a minimum reproducible project so I decided to create an issue rather than a PR in case this is just user error on my end somehow
I believe the current check to determine if we are in node or browser:
is flagging both the electron main and renderer processes as browser, causing request calls made from the main process (node) to fail with
XMLHttpRequest is not definedAfter modifying the check as advised by this comment to the following:
request calls made from either process work as expected
I don't have a minimum reproducible project so I decided to create an issue rather than a PR in case this is just user error on my end somehow