Skip to content

Commit

Permalink
Fix crash with node.js that has or polyfills fetch() (#6)
Browse files Browse the repository at this point in the history
"source-map" v0.7.3 uses `if (typeof fetch === "function")` to
differentiate between browser and node.js environments. If a node.js
environment has `fetch()` -- will be the default in node v18 -- or
polyfills it, then it throws:
    You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
  • Loading branch information
trentm authored Mar 7, 2022
1 parent 315b275 commit c537a8d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
48 changes: 37 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"homepage": "https://github.com/rexxars/load-source-map#readme",
"dependencies": {
"source-map": "^0.7.3"
"source-map": "^0.8.0-beta.0"
},
"devDependencies": {
"nyc": "^15.1.0",
Expand Down

0 comments on commit c537a8d

Please sign in to comment.