diff --git a/bun.lockb b/bun.lockb index d6673bc..74a492f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 1a0d596..2835ddc 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@eslint/js": "^9.0.0", "@sveltejs/adapter-auto": "^3.2.0", + "@sveltejs/adapter-cloudflare": "^4.4.0", "@sveltejs/kit": "^2.5.6", "@sveltejs/vite-plugin-svelte": "^3.1.0", "autoprefixer": "^10.4.19", diff --git a/src/app.d.ts b/src/app.d.ts index 103486c..c71da9b 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -6,7 +6,15 @@ declare global { // interface Locals {} // interface PageData {} // interface PageState {} - // interface Platform {} + interface Platform { + env: { + COUNTER: DurableObjectNamespace; + }; + context: { + waitUntil(promise: Promise): void; + }; + caches: CacheStorage & { default: Cache }; + } } } diff --git a/svelte.config.js b/svelte.config.js index d9c597d..0b4301a 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from "@sveltejs/adapter-auto"; +import adapter from "@sveltejs/adapter-cloudflare"; import sveltePreprocess from "svelte-preprocess"; /** @type {import('@sveltejs/kit').Config} */ @@ -11,7 +11,12 @@ const config = { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // If your environment is not supported or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter(), + adapter: adapter({ + routes: { + include: ['/*'], + + } + }), }, };