import{defineConfig}from"vite"exportdefaultdefineConfig({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"awaitbuild({// ...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{typeConfiguration}from"webpack"exportdefault{// ...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",},},}satisfiesConfiguration
Rollup
import{RollupOptions}from"rollup"importAliasfrom"@rollup/plugin-alias"exportdefault{// ...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",},}),],}satisfiesRollupOptions