diff --git a/examples/svelte/src/routes/about/+page.svelte b/examples/svelte/src/routes/about/+page.svelte new file mode 100644 index 0000000..7f7946d --- /dev/null +++ b/examples/svelte/src/routes/about/+page.svelte @@ -0,0 +1,26 @@ + + About + + + +
+

About this app

+ +

+ This is a SvelteKit app. You can make your own by typing the + following into your command line and following the prompts: +

+ +
npm create svelte@latest
+ +

+ The page you're looking at is purely static HTML, with no client-side interactivity needed. + Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening + the devtools network panel and reloading. +

+ +

+ The Sverdle page illustrates SvelteKit's data loading and form handling. Try + using it with JavaScript disabled! +

+
diff --git a/examples/svelte/src/routes/about/+page.ts b/examples/svelte/src/routes/about/+page.ts new file mode 100644 index 0000000..e739ef4 --- /dev/null +++ b/examples/svelte/src/routes/about/+page.ts @@ -0,0 +1,9 @@ +import { dev } from '$app/environment'; + +// we don't need any JS on this page, though we'll load +// it in dev so that we get hot module replacement +export const csr = dev; + +// since there's no dynamic data here, we can prerender +// it so that it gets served as a static asset in production +export const prerender = true;