web: use static svelte adapter instead of auto

This commit is contained in:
wukko 2024-06-16 19:21:26 +06:00
parent 3c1a69063d
commit 1fad4816b2
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
4 changed files with 19 additions and 15 deletions

14
web/package-lock.json generated
View file

@ -14,7 +14,7 @@
"@tabler/icons-svelte": "^3.6.0"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",
@ -706,14 +706,12 @@
"win32"
]
},
"node_modules/@sveltejs/adapter-auto": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-3.2.1.tgz",
"integrity": "sha512-/3xx8ZFCD5UBc/7AbyXkFF3HNCzWAp2xncH8HA4doGjoGQEN7PmwiRx4Y9nOzi4mqDqYYUic0gaIAE2khWWU4Q==",
"node_modules/@sveltejs/adapter-static": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.2.tgz",
"integrity": "sha512-/EBFydZDwfwFfFEuF1vzUseBoRziwKP7AoHAwv+Ot3M084sE/HTVBHf9mCmXfdM9ijprY5YEugZjleflncX5fQ==",
"dev": true,
"dependencies": {
"import-meta-resolve": "^4.1.0"
},
"license": "MIT",
"peerDependencies": {
"@sveltejs/kit": "^2.0.0"
}

View file

@ -20,7 +20,7 @@
},
"homepage": "https://cobalt.tools/",
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",

View file

@ -0,0 +1 @@
export const prerender = true;

View file

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
@ -8,11 +8,16 @@ const config = {
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// 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: adapter()
}
adapter: adapter({
// default options are shown. On some platforms
// these options are set automatically — see below
pages: 'build',
assets: 'build',
fallback: undefined,
precompress: false,
strict: true
})
}
};
export default config;