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",
},
},
})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",
},
})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 Configurationimport { 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