node-source-map-support icon indicating copy to clipboard operation
node-source-map-support copied to clipboard

Enable running browser-bundled in Node.js

Open grantila opened this issue 8 years ago • 0 comments

There is a function called isInBrowser() which is used to not run XMLHttpRequest's in Node. The documentation also mentions this, and the option to specify { environment: 'node' }. However, the logic still uses XMLHttpRequest, hindering JavaScript bundled for the web to be run in Node.js, which is useful e.g. to perform server-side rendering of client-side routes - running the web app in Node. This PR fixes this.

grantila avatar Oct 10 '17 14:10 grantila