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
@@ -164,7 +164,7 @@ The [Cloudflare Vite Plugin](https://developers.cloudflare.com/workers/vite-plug
To fix this, bknd exports a Vite plugin that provides filesystem access during development. You can use it by adding the following to your `vite.config.ts` file:
```ts
import { devFsVitePlugin } from "bknd/adapter/cloudflare";
import { devFsVitePlugin } from "bknd/adapter/cloudflare/vite";
export default defineConfig({
plugins: [devFsVitePlugin()], // [!code highlight]
@@ -174,7 +174,7 @@ export default defineConfig({
Now to use this polyfill, you can use the `devFsWrite` function to write files to the filesystem.
```ts
import { devFsWrite } from "bknd/adapter/cloudflare"; // [!code highlight]
import { devFsWrite } from "bknd/adapter/cloudflare/vite"; // [!code highlight]
import { syncTypes } from "bknd/plugins";
export default {