forked from ClimateTown/knowledge-hub
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
31 lines (28 loc) · 857 Bytes
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import adapter from "@sveltejs/adapter-static"
import { vitePreprocess } from "@sveltejs/kit/vite"
// Adapted from [Stack overflow](https://stackoverflow.com/questions/72730192/how-to-host-a-sveltekit-adapter-static-project-on-github-pages)
// and [adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static#github-pages)
const dev = process.argv.includes("dev")
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
compilerOptions: {
accessors: process.env.TEST,
},
kit: {
adapter: adapter({
pages: "build",
assets: "build",
fallback: "404.html",
precompress: false,
}),
alias: { "lib/": "./src/lib/" },
prerender: {
entries: ["*"],
},
paths: {
base: dev ? "" : "/knowledge-hub",
},
},
}
export default config