0.1.1 • Published 2 years ago

swc-plugin-fetch-replace v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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