-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.js
More file actions
38 lines (34 loc) · 1.06 KB
/
Copy pathsvelte.config.js
File metadata and controls
38 lines (34 loc) · 1.06 KB
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
32
33
34
35
36
37
38
import adapter from '@sveltejs/adapter-static';
const base = process.argv.includes('dev') ? '' : process.env.BASE_PATH;
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter({
// default options are shown
pages: 'build',
assets: 'build',
fallback: '404.html',
precompress: false,
strict: true
}),
alias: { '@ui/*': 'src/lib/components/ui/*' },
prerender: {
handleHttpError: ({ path, message }) => {
// ignore deliberate link to shiny 404 page
if (path.includes('/dufs') || path.includes('/programming') || path.includes('/docs/')) {
return;
}
// otherwise fail the build
throw new Error(message);
},
handleMissingId: 'warn'
},
paths: {
base: base
}
}
};
export default config;