forked from AIObjectives/talk-to-the-city-reports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.static.js
44 lines (41 loc) · 1 KB
/
svelte.config.static.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
32
33
34
35
36
37
38
39
40
41
42
43
44
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter({
strict: false,
pages: 'build',
assets: 'build',
fallback: null,
precompress: false
}),
alias: {
$lib: 'src/lib',
$components: 'src/components',
$routes: 'src/routes'
},
prerender: {
entries: ['/static-report'],
crawl: false,
origin: 'http://sveltekit-prerender',
concurrency: 3,
handleHttpError: ({ path, referrer, message }) => {
console.log(path);
if (path.indexOf('/permalink') !== -1 || path.indexOf('/report/') !== -1) {
return;
}
// otherwise fail the build
throw new Error(message);
}
},
version: {
name: Date.now().toString()
},
paths: {
base: process.env.BN_SVELTE_BASE
}
}
};
export default config;