Skip to content

Commit

Permalink
[UPD] move kit.prerender.default to layout
Browse files Browse the repository at this point in the history
Setting was deprecated. See error:

Error: config.kit.prerender.default has been removed. You can set it inside the top level +layout.js instead. See the PR for more information: sveltejs/kit#6197
  • Loading branch information
holdenrehg committed Sep 3, 2022
1 parent 012e5fa commit 31047a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script>
export const prerender = true;
import '../styles';
import SiteHeader from '$lib/components/SiteHeader.svelte';
import SiteFooter from '$lib/components/SiteFooter.svelte';
Expand Down
1 change: 0 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const config = {
lib: './src/lib',
},
prerender: {
default: true,
entries: [
...articleSlugs.map(slug => `/blog/${slug}`),
...articleSlugs.map(slug => `/blog/${slug}.raw`),
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sveltekit } from '@sveltejs/kit/vite';

const config = {
plugins: [sveltekit()]
plugins: [sveltekit()]
};

export default config;

0 comments on commit 31047a5

Please sign in to comment.