feat: add a static site option
This commit is contained in:
3 files changed
+18
-11
No files matched your search
+17
-11
@@ -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'],
|
||||
|
||||
Reference in new issue
Block a user