-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.js
More file actions
29 lines (26 loc) · 822 Bytes
/
Copy pathsvelte.config.js
File metadata and controls
29 lines (26 loc) · 822 Bytes
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
import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */
const dev = process.env.NODE_ENV === 'development';
const repo = 'wikiblame'; // change if your GitHub repo name is different
const config = {
compilerOptions: {
// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true)
},
kit: {
// Use the static adapter for GitHub Pages. Build output lives in `build`.
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: '404.html'
}),
// For project pages (https://user.github.io/repo) set the base to the repo name.
paths: {
base: dev ? '' : `/${repo}`
},
prerender: {
entries: ['*']
}
}
};
export default config;