JSPM

fetch-mock-forwarder

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 211
  • Score
    100M100P100Q98524F
  • License MIT

A drop-in replacement for isomorphic-fetch to be used with fetch-mock in browsers

Package Exports

  • fetch-mock-forwarder

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fetch-mock-forwarder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fetch-mock-forwarder is intended to be used as a "replacement" for isomorphic-fetch to be used by fetch-mock so that modules may still import isomorphic-fetch assuming that it has been aliased to this project.

This may be done in webpack as such:

resolve: {
    alias: {
        'isomorphic-fetch': 'fetch-mock-forwarder'
    }
}

In reality, all this package does is require whatwg-fetch and then calls the fetch function available on the global object.