Skip to content

Commit

Permalink
Fix static building
Browse files Browse the repository at this point in the history
OH FFS I NEEDED THE PRERENDER VARIABLE IN +LAYOUT.JS NOT +LAYOUT.SVELTE WHY I WAS LOSING MY FUCKING SHIT TODAY AND MONTHS AGO
  • Loading branch information
JovannMC committed Nov 24, 2024
1 parent 79cbe50 commit 5a0a249
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 6 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/app.postcss
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ body {
@apply h-full overflow-hidden;
}

/* modern theme */
@font-face {
font-family: 'Quicksand';
src: url('/fonts/Quicksand.ttf');
font-display: swap;
}

.btn {
@apply border-2 border-success-300-600-token;
@apply border-2 border-success-300-600-token;
}

.code {
@apply text-secondary-600-300-token;
}
}
1 change: 1 addition & 0 deletions src/routes/+layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const prerender = true;
6 changes: 3 additions & 3 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import '../app.postcss';
import { AppShell, AppBar } from '@skeletonlabs/skeleton';
import { onMount } from 'svelte';
import { afterNavigate } from '$app/navigation';
import { AppBar, AppShell } from '@skeletonlabs/skeleton';
import { onMount } from 'svelte';
import { slide } from 'svelte/transition';
import '../app.postcss';
import Footer from '../components/Footer.svelte';
Expand Down
8 changes: 4 additions & 4 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import { onMount } from 'svelte';
import TypeIt from 'typeit';
import { Splide, SplideSlide, type Options } from '@splidejs/svelte-splide';
import '@splidejs/svelte-splide/css';
import { onMount } from 'svelte';
import TypeIt from 'typeit';
import Container from '../components/Container.svelte';
import ActionButton from '../components/ActionButton.svelte';
import Card from '../components/Card.svelte';
import Container from '../components/Container.svelte';
import ResponsiveImage from '../components/ResponsiveImage.svelte';
import ActionButton from '../components/ActionButton.svelte';
onMount(() => {
const phrases = [
Expand Down
2 changes: 1 addition & 1 deletion src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import Container from '../../components/Container.svelte';
import Card from '../../components/Card.svelte';
import Container from '../../components/Container.svelte';
import { Splide, SplideSlide, type Options } from '@splidejs/svelte-splide';
import '@splidejs/svelte-splide/css';
Expand Down
17 changes: 11 additions & 6 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -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} */
Expand All @@ -12,10 +12,15 @@ const config = {
inspector: true
},
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;

0 comments on commit 5a0a249

Please sign in to comment.