fix(sveltekit): make adapter runtime-agnostic

Remove process.env default to support all SvelteKit runtimes
(Node, Cloudflare Workers, Vercel Edge, Deno). Users now pass
env explicitly via $env/dynamic/private.
This commit is contained in:
Szymon Rączka
2025-12-28 12:47:09 +01:00
parent 90b4de7093
commit a97a79f11e
4 changed files with 24 additions and 12 deletions
@@ -1,9 +1,10 @@
import type { PageServerLoad } from "./$types";
import { getApp } from "bknd/adapter/sveltekit";
import { env } from "$env/dynamic/private";
import config from "../../bknd.config";
export const load: PageServerLoad = async () => {
const app = await getApp(config);
const app = await getApp(config, env);
const api = app.getApi();
const todos = await api.data.readMany("todos");