diff --git a/bun.lockb b/bun.lockb index 4b14df82..6480ec87 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 2f3343da..cb3d499c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/svelte.config.js b/svelte.config.js index b2323410..fe92fd3d 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -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'],