feat: remove cloudflare adapter dependency to nodejs_compat

- adjusted bindings extraction to not rely on node inspect anymore
- added new vite export that uses nodejs apis
This commit is contained in:
dswbx
2025-11-11 13:33:04 +01:00
parent 3f55c0f2c5
commit 4859b99954
11 changed files with 119 additions and 31 deletions
+11 -2
View File
@@ -1,3 +1,4 @@
/** biome-ignore-all lint/suspicious/noConsole: . */
import { $ } from "bun";
import * as tsup from "tsup";
import pkg from "./package.json" with { type: "json" };
@@ -267,7 +268,7 @@ async function buildAdapters() {
tsup.build(baseConfig("react-router")),
tsup.build(
baseConfig("bun", {
external: [/^bun\:.*/],
external: [/^bun:.*/],
}),
),
tsup.build(baseConfig("astro")),
@@ -286,6 +287,14 @@ async function buildAdapters() {
external: [/bknd/, "wrangler", "node:process"],
}),
),
tsup.build(
baseConfig("cloudflare/vite", {
target: "esnext",
entry: ["src/adapter/cloudflare/vite.ts"],
outDir: "dist/adapter/cloudflare",
metafile: false,
}),
),
tsup.build({
...baseConfig("vite"),
@@ -322,7 +331,7 @@ async function buildAdapters() {
entry: ["src/adapter/sqlite/bun.ts"],
outDir: "dist/adapter/sqlite",
metafile: false,
external: [/^bun\:.*/],
external: [/^bun:.*/],
}),
]);
}