-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsvelte.config.js
More file actions
37 lines (35 loc) · 1.08 KB
/
svelte.config.js
File metadata and controls
37 lines (35 loc) · 1.08 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
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
// default options are shown
pages: 'build',
assets: 'build',
// fallback: '200.html',
fallback: null,
prsecompress: false,
// ssr: false,
strict: false,
}),
paths: {
//base: process.env.NODE_ENV === 'production' ? '/bexis2-github-io' : '' ///bexis2-github-io/
//base: process.env.NODE_ENV === 'production' ? '' : ''
},
//trailingSlash: 'always',
// Build throws error for all links pointing to the backend. Therefor we need to exclude for checking the link during build.
prerender: {
handleHttpError: ({ status, path, referrer, referenceType }) => {
if (path.startsWith('/backend/') || path.startsWith('/images/') || path == '/') {
//do nothing as it links to backend
} else {
throw new Error(
path +
' Missing link.' +
`${status} ${path}${referrer ? ` (${referenceType} from ${referrer})` : ''}`
);
}
console.warn(`${status} ${path}${referrer ? ` (${referenceType} from ${referrer})` : ''}`);
}
}
}
};