2
0

Add cloudflare svelte adapter

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-23 10:48:49 +08:00
parent 099524af26
commit 948c5013d3
3 changed files with 859 additions and 7 deletions

View File

@@ -16,6 +16,7 @@
"@eslint/compat": "^1.4.0", "@eslint/compat": "^1.4.0",
"@eslint/js": "^9.39.1", "@eslint/js": "^9.39.1",
"@sveltejs/adapter-auto": "^7.0.0", "@sveltejs/adapter-auto": "^7.0.0",
"@sveltejs/adapter-cloudflare": "^7.2.6",
"@sveltejs/kit": "^2.49.1", "@sveltejs/kit": "^2.49.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1", "@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/typography": "^0.5.19", "@tailwindcss/typography": "^0.5.19",

841
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,23 @@
import adapter from '@sveltejs/adapter-auto'; import adapter from "@sveltejs/adapter-cloudflare";
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
kit: { kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. adapter: adapter({
// If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See below for an explanation of these options
// See https://svelte.dev/docs/kit/adapters for more information about adapters. config: undefined,
adapter: adapter() platformProxy: {
} configPath: undefined,
environment: undefined,
persist: undefined,
},
fallback: "plaintext",
routes: {
include: ["/*"],
exclude: ["<all>"],
},
}),
},
}; };
export default config; export default config;