diff --git a/birthday_web_ui/package-lock.json b/birthday_web_ui/package-lock.json index 77fd48c..662d86c 100644 --- a/birthday_web_ui/package-lock.json +++ b/birthday_web_ui/package-lock.json @@ -12,6 +12,7 @@ "@eslint/js": "^10.0.1", "@playwright/test": "^1.59.1", "@sveltejs/adapter-auto": "^7.0.1", + "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.57.0", "@sveltejs/vite-plugin-svelte": "^7.0.0", "@tailwindcss/forms": "^0.5.11", @@ -704,6 +705,16 @@ "@sveltejs/kit": "^2.0.0" } }, + "node_modules/@sveltejs/adapter-static": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.10.tgz", + "integrity": "sha512-7D9lYFWJmB7zxZyTE/qxjksvMqzMuYrrsyh1f4AlZqeZeACPRySjbC3aFiY55wb1tWUaKOQG9PVbm74JcN2Iew==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, "node_modules/@sveltejs/kit": { "version": "2.60.1", "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.60.1.tgz", diff --git a/birthday_web_ui/package.json b/birthday_web_ui/package.json index a7e013f..1dc1262 100644 --- a/birthday_web_ui/package.json +++ b/birthday_web_ui/package.json @@ -21,6 +21,7 @@ "@eslint/js": "^10.0.1", "@playwright/test": "^1.59.1", "@sveltejs/adapter-auto": "^7.0.1", + "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.57.0", "@sveltejs/vite-plugin-svelte": "^7.0.0", "@tailwindcss/forms": "^0.5.11", diff --git a/birthday_web_ui/src/app.d.ts b/birthday_web_ui/src/app.d.ts index da08e6d..aa35ae2 100644 --- a/birthday_web_ui/src/app.d.ts +++ b/birthday_web_ui/src/app.d.ts @@ -11,3 +11,4 @@ declare global { } export {}; +export const prerender = true diff --git a/birthday_web_ui/src/routes/+layout.js b/birthday_web_ui/src/routes/+layout.js new file mode 100644 index 0000000..3c2569c --- /dev/null +++ b/birthday_web_ui/src/routes/+layout.js @@ -0,0 +1,2 @@ + + export const prerender = true \ No newline at end of file diff --git a/birthday_web_ui/src/routes/+layout.svelte b/birthday_web_ui/src/routes/+layout.svelte index 0d8eb03..65e8182 100644 --- a/birthday_web_ui/src/routes/+layout.svelte +++ b/birthday_web_ui/src/routes/+layout.svelte @@ -1,9 +1,7 @@ - {@render children()} diff --git a/birthday_web_ui/svelte.config.js b/birthday_web_ui/svelte.config.js index 0c3412e..de4ea9b 100644 --- a/birthday_web_ui/svelte.config.js +++ b/birthday_web_ui/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from '@sveltejs/adapter-auto'; +import adapter from '@sveltejs/adapter-static'; /** @type {import('@sveltejs/kit').Config} */ const config = { @@ -10,7 +10,13 @@ const config = { // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter() + adapter: adapter({ + pages: 'build', + assets: 'build', + fallback: undefined, + precompress: false, + strict: true + }) } };