Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure using the nodejs source-map support
When using libraries like js-dom that provide a browser-like api inside nodejs, the source map support can be tricked into thinking that it is running in a browsers, which will attempt to use `XMLHttpRequest` instead of `require('fs')`. Depending on implementation of the XMLHttpRequest (presumably loaded by js-dom or alternative), this can be much slower to load source maps from disk, causing a higher latency run of nodejs. Even if the user is using a browser-like experience within nodejs, the nodejs implementation of source map support should always be superior, thus we should hint to the source map support to always use the nodejs fs module to load source maps. For me, I noticed this slow down in test runs, and found an 80% speedup across some runs. Other's mileage may vary.
- Loading branch information