swc-plugin-fetch-replace

v0.1.1
SWC plugin for replaces global `fetch` with an arbitrary function.
swc-plugin

swc-plugin-fetch-replace

npm version

SWC plugin for replaces global fetch with an arbitrary function.

Install

$ pnpm add -D swc-plugin-fetch-replace

Configuration

Function name with replace_fetch.

.swcrc

{
  "jsc": {
    "experimental": {
      "plugins": [
        [
          "swc-plugin-fetch-replace",
          {
            "replaceName": "replace_fetch"
          }
        ]
      ]
    }
  }
}

todo

  • add examples
  • add jest examples
  • summarize in an article
npm i swc-plugin-fetch-replace

Metadata

Downloads

Maintainers