From 5a0a2490f30db07f36a011278f3196374493cd64 Mon Sep 17 00:00:00 2001 From: JovannMC Date: Sun, 24 Nov 2024 19:41:00 +0300 Subject: [PATCH] Fix static building OH FFS I NEEDED THE PRERENDER VARIABLE IN +LAYOUT.JS NOT +LAYOUT.SVELTE WHY I WAS LOSING MY FUCKING SHIT TODAY AND MONTHS AGO --- package.json | 2 +- pnpm-lock.yaml | 13 ++++++------- src/app.postcss | 5 ++--- src/routes/+layout.js | 1 + src/routes/+layout.svelte | 6 +++--- src/routes/+page.svelte | 8 ++++---- src/routes/projects/+page.svelte | 2 +- svelte.config.js | 17 +++++++++++------ 8 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 src/routes/+layout.js diff --git a/package.json b/package.json index f010f87..e0d5725 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@skeletonlabs/skeleton": "2.10.3", "@skeletonlabs/tw-plugin": "0.4.0", - "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/adapter-static": "^3.0.6", "@sveltejs/kit": "^2.8.2", "@sveltejs/vite-plugin-svelte": "^4.0.1", "@tailwindcss/forms": "0.5.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a959cc..dc30898 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,9 +21,9 @@ importers: '@skeletonlabs/tw-plugin': specifier: 0.4.0 version: 0.4.0(tailwindcss@3.4.15) - '@sveltejs/adapter-auto': - specifier: ^3.3.1 - version: 3.3.1(@sveltejs/kit@2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3))) + '@sveltejs/adapter-static': + specifier: ^3.0.6 + version: 3.0.6(@sveltejs/kit@2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3))) '@sveltejs/kit': specifier: ^2.8.2 version: 2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)) @@ -440,8 +440,8 @@ packages: '@splidejs/svelte-splide@0.2.9': resolution: {integrity: sha512-04ekJnDIJKEAhklKQMhkg4Yx0Ihtkk18eA9JeHPON0lDTngQxlOYdEYTJWH2UON45VxmVqoLHv04I++JphO36w==} - '@sveltejs/adapter-auto@3.3.1': - resolution: {integrity: sha512-5Sc7WAxYdL6q9j/+D0jJKjGREGlfIevDyHSQ2eNETHcB1TKlQWHcAo8AS8H1QdjNvSXpvOwNjykDUHPEAyGgdQ==} + '@sveltejs/adapter-static@3.0.6': + resolution: {integrity: sha512-MGJcesnJWj7FxDcB/GbrdYD3q24Uk0PIL4QIX149ku+hlJuj//nxUbb0HxUTpjkecWfHjVveSUnUaQWnPRXlpg==} peerDependencies: '@sveltejs/kit': ^2.0.0 @@ -1783,10 +1783,9 @@ snapshots: dependencies: '@splidejs/splide': 4.1.4 - '@sveltejs/adapter-auto@3.3.1(@sveltejs/kit@2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))': + '@sveltejs/adapter-static@3.0.6(@sveltejs/kit@2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))': dependencies: '@sveltejs/kit': 2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)) - import-meta-resolve: 4.1.0 '@sveltejs/kit@2.8.2(@sveltejs/vite-plugin-svelte@4.0.1(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3)))(svelte@5.2.7)(vite@5.4.11(@types/node@22.9.3))': dependencies: diff --git a/src/app.postcss b/src/app.postcss index 36f5ab4..dc0d199 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -8,7 +8,6 @@ body { @apply h-full overflow-hidden; } -/* modern theme */ @font-face { font-family: 'Quicksand'; src: url('/fonts/Quicksand.ttf'); @@ -16,9 +15,9 @@ body { } .btn { - @apply border-2 border-success-300-600-token; + @apply border-2 border-success-300-600-token; } .code { @apply text-secondary-600-300-token; -} \ No newline at end of file +} diff --git a/src/routes/+layout.js b/src/routes/+layout.js new file mode 100644 index 0000000..189f71e --- /dev/null +++ b/src/routes/+layout.js @@ -0,0 +1 @@ +export const prerender = true; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f58b2cf..5f269c6 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,9 +1,9 @@