Use Svelte Static

This commit is contained in:
Neshura 2024-05-20 01:14:17 +02:00
parent 85dd5cd9ae
commit 68a2540e76
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
4 changed files with 14 additions and 1 deletions

View file

@ -12,6 +12,7 @@
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.0", "@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0", "@sveltejs/vite-plugin-svelte": "^3.0.0",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",

1
src/routes/+layout.ts Normal file
View file

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

View file

@ -11,7 +11,13 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // 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. // 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() adapter: adapter({
pages: 'build',
assets: 'build',
fallback: undefined,
precompress: false,
strict: true
})
} }
}; };

View file

@ -338,6 +338,11 @@
dependencies: dependencies:
import-meta-resolve "^4.0.0" import-meta-resolve "^4.0.0"
"@sveltejs/adapter-static@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-static/-/adapter-static-3.0.1.tgz#64c36020435d7b1eacd362b2d027fefda5ec2e44"
integrity sha512-6lMvf7xYEJ+oGeR5L8DFJJrowkefTK6ZgA4JiMqoClMkKq0s6yvsd3FZfCFvX1fQ0tpCD7fkuRVHsnUVgsHyNg==
"@sveltejs/kit@^2.0.0": "@sveltejs/kit@^2.0.0":
version "2.5.9" version "2.5.9"
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-2.5.9.tgz#400edc556685d7c6d6c0582d55cde20acfff6db7" resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-2.5.9.tgz#400edc556685d7c6d6c0582d55cde20acfff6db7"