0.2.0 • Published 1 year ago

fetch-unfiller v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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
0.2.0

1 year ago

0.1.0

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago