-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsvelte.config.js
More file actions
48 lines (41 loc) · 992 Bytes
/
svelte.config.js
File metadata and controls
48 lines (41 loc) · 992 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2021-2024 Adobe, Copyright 2025 The C2PA Contributors
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
import childProcess from 'child_process';
const BASE_PATH = process.env.BASE_PATH || '';
if (BASE_PATH) {
console.log(`Svelte config using base path: ${BASE_PATH}`);
}
const gitRevision = childProcess
.execSync('git rev-parse --short HEAD')
.toString()
.trim();
/** @type {import('@sveltejs/kit').Config} */
const config = {
compilerOptions: {
enableSourcemap: true,
},
preprocess: vitePreprocess({}),
kit: {
adapter: adapter({
pages: 'dist',
assets: 'dist',
fallback: 'index.html',
precompress: false,
strict: true,
}),
alias: {
$assets: 'assets',
$src: 'src',
},
paths: {
base: BASE_PATH,
relative: true,
},
version: {
name: gitRevision,
pollInterval: 60 * 1000,
},
},
};
export default config;