feat: add a static site option
This commit is contained in:
3 files changed
+8
-1
No files matched your search
@@ -9,6 +9,7 @@
|
|||||||
"@svelte-put/qr": "^2.0.0",
|
"@svelte-put/qr": "^2.0.0",
|
||||||
"@sveltejs/adapter-auto": "^3.3.1",
|
"@sveltejs/adapter-auto": "^3.3.1",
|
||||||
"@sveltejs/adapter-node": "^5.2.9",
|
"@sveltejs/adapter-node": "^5.2.9",
|
||||||
|
"@sveltejs/adapter-static": "^3.0.8",
|
||||||
"@sveltejs/kit": "^2.17.1",
|
"@sveltejs/kit": "^2.17.1",
|
||||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||||
"@tailwindcss/container-queries": "^0.1.1",
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
|
|||||||
+7
-1
@@ -1,6 +1,7 @@
|
|||||||
import node from '@sveltejs/adapter-node'
|
import node from '@sveltejs/adapter-node'
|
||||||
import bun from 'svelte-adapter-bun-next'
|
import bun from 'svelte-adapter-bun-next'
|
||||||
import auto from '@sveltejs/adapter-auto'
|
import auto from '@sveltejs/adapter-auto'
|
||||||
|
import staticAdapter from '@sveltejs/adapter-static'
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
@@ -14,7 +15,12 @@ const config = {
|
|||||||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
// 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.
|
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||||
adapter:
|
adapter:
|
||||||
process.env.ADAPTER == 'node'
|
process.env.ADAPTER == 'static'
|
||||||
|
? staticAdapter({
|
||||||
|
fallback: 'app.html',
|
||||||
|
precompress: true,
|
||||||
|
})
|
||||||
|
: process.env.ADAPTER == 'node'
|
||||||
? node()
|
? node()
|
||||||
: process.env.ADAPTER == 'bun'
|
: process.env.ADAPTER == 'bun'
|
||||||
? bun({
|
? bun({
|
||||||
|
|||||||
Reference in new issue
Block a user