Prerender Page In Svelte Kit
Posted on: June 29, 2021 by Jatin Hemnani
In this article, you will learn How To Prerender Page In Svelte Kit.
Prerendering Page
To prerender the page you have to add a script tag with context of module.
<script context="module">
export const prerender = true;
</script>
In this way, Svelte Kit will know which page to prerender. Prerendering will generate HTML files at the build time.
Result
Above you can see the index.html file inside the about folder.
Share on social media
//