-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
42 lines (34 loc) · 1.07 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
import adapterStatic from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte'],
compilerOptions: {
enableSourcemap: true,
},
preprocess: preprocess({
postcss: true,
sourceMap: true,
aliases: [],
}),
vitePlugin: {
inspector: {
toggleKeyCombo: 'alt+shift+c',
},
},
kit: {
version: {
// Not sure whether I should reverse the logic here.
// Currently we are using the version from the environment variable, which has to be set outside.
// This is meant to allow to have "no version" as per debug builds (next.pf2oo.ls) and "version" as per release builds
// But we might want to instead have the versions by default and build timestamp with a debug flag. But then this can cause issues in terms of what version is what.
name: process.env.VERSION ?? undefined,
},
adapter: adapterStatic({ fallback: '404.html' }),
paths: {
base: process.env.BASE_PATH ?? '',
},
prerender: { handleHttpError: 'warn' },
},
};
export default config;