There was an error while loading. Please reload this page.
When attempting to import "myscript"; to use in a REST API the XMLHttpRequest instance in undefined.
import "myscript";
XMLHttpRequest
Assumption was made:
// We are writing some browser module here so the no import found should be ignored // eslint-disable-next-line no-undef var request = new XMLHttpRequest();
In order to fix this the dependencies needs to be introduced.
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
When attempting to
import "myscript";to use in a REST API theXMLHttpRequestinstance in undefined.Assumption was made:
In order to fix this the dependencies needs to be introduced.