feat: add a static site option

This commit is contained in:
James Xylight committed 2025-07-30 14:49:17 -07:00
1 parent fb89b951a9
commit 1a059fcf89
3 files changed
+18 -11

No files matched your search

BIN
View File
Binary file not shown.
+1
View File
@@ -9,6 +9,7 @@
"@svelte-put/qr": "^2.0.0",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-node": "^5.2.9",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.17.1",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tailwindcss/container-queries": "^0.1.1",
+17 -11
View File
@@ -1,6 +1,7 @@
import node from '@sveltejs/adapter-node'
import bun from 'svelte-adapter-bun-next'
import auto from '@sveltejs/adapter-auto'
import staticAdapter from '@sveltejs/adapter-static'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
/** @type {import('@sveltejs/kit').Config} */
@@ -14,17 +15,22 @@ const config = {
// 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:
process.env.ADAPTER == 'node'
? node()
: process.env.ADAPTER == 'bun'
? bun({
out: 'build',
precompress: {
brotli: true,
gzip: true,
},
})
: auto(),
process.env.ADAPTER == 'static'
? staticAdapter({
fallback: 'app.html',
precompress: true,
})
: process.env.ADAPTER == 'node'
? node()
: process.env.ADAPTER == 'bun'
? bun({
out: 'build',
precompress: {
brotli: true,
gzip: true,
},
})
: auto(),
csp: {
directives: {
'script-src': ['self'],