Skip to content

Commit 4e82770

Browse files
frodesundbyandnorda
andcommitted
prerender everything
Co-authored-by: andreas Nordahl <[email protected]>
1 parent ca64d95 commit 4e82770

File tree

4 files changed

+90
-11
lines changed

4 files changed

+90
-11
lines changed

package-lock.json

+61-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"vite": "^5.0.3"
3131
},
3232
"dependencies": {
33-
"@nais/ds-svelte-community": "^0.7.5"
33+
"@nais/ds-svelte-community": "^0.7.5",
34+
"svelte-preprocess": "^6.0.3"
3435
}
3536
}

src/routes/+layout.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const prerender = true;

svelte.config.js

+26-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
1-
import adapter from "@sveltejs/adapter-auto";
2-
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
1+
import adapter from "@sveltejs/adapter-static";
2+
import preprocess from "svelte-preprocess";
3+
import path from "path";
34

45
/** @type {import('@sveltejs/kit').Config} */
56
const config = {
6-
// Consult https://svelte.dev/docs/kit/integrations
7+
// Consult https://github.com/sveltejs/svelte-preprocess
78
// for more information about preprocessors
8-
preprocess: vitePreprocess(),
9+
preprocess: preprocess({ postcss: true }),
910

1011
kit: {
1112
adapter: adapter(),
12-
outDir: "build",
13+
14+
alias: {
15+
$lib: path.resolve(".", "src", "lib"),
16+
},
1317
},
1418
};
1519

1620
export default config;
21+
22+
// import adapter from "@sveltejs/adapter-auto";
23+
// import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
24+
25+
// /** @type {import('@sveltejs/kit').Config} */
26+
// const config = {
27+
// // Consult https://svelte.dev/docs/kit/integrations
28+
// // for more information about preprocessors
29+
// preprocess: vitePreprocess(),
30+
31+
// kit: {
32+
// adapter: adapter(),
33+
// outDir: "build",
34+
// },
35+
// };
36+
37+
// export default config;

0 commit comments

Comments
 (0)