fetch-unfiller

0.2.0 • Public • Published

fetch-unfiller

npm npm bundle size

Installation

Usage

Vite

import { defineConfig } from "vite"

export default defineConfig({
  resolve: {
    alias: {
      // Alias any `fetch` package in use to `fetch-unfiller`
      "cross-fetch": "fetch-unfiller",
      // Use `fetch-unfiller/node` if building for node
      "node-fetch": "fetch-unfiller/node",
    },
  },
})

esbuild

import { build } from "esbuild"

await build({
  // ...
  alias: {
    // Alias any `fetch` package in use to `fetch-unfiller`
    "cross-fetch": "fetch-unfiller",
    // Use `fetch-unfiller/node` if building for node
    "node-fetch": "fetch-unfiller/node",
  },
})

Webpack/Rspack

import { type Configuration } from "webpack"

export default {
  // ...
  resolve: {
    alias: {
      // Alias any `fetch` package in use to `fetch-unfiller`
      "cross-fetch": "fetch-unfiller",
      // Use `fetch-unfiller/node` if building for node
      "node-fetch": "fetch-unfiller/node",
    },
  },
} satisfies Configuration

Rollup

import { RollupOptions } from "rollup"
import Alias from "@rollup/plugin-alias"

export default {
  // ...
  plugins: [
    // ...
    Alias({
      entries: {
        // Alias any `fetch` package in use to `fetch-unfiller`
        "cross-fetch": "fetch-unfiller",
        // Use `fetch-unfiller/node` if building for node
        "node-fetch": "fetch-unfiller/node",
      },
    }),
  ],
} satisfies RollupOptions

Readme

Keywords

none

Package Sidebar

Install

npm i fetch-unfiller

Weekly Downloads

20

Version

0.2.0

License

MIT

Unpacked Size

5.08 kB

Total Files

7

Last publish

Collaborators

  • beequeue