-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsvelte.config.js
More file actions
58 lines (54 loc) · 1.56 KB
/
svelte.config.js
File metadata and controls
58 lines (54 loc) · 1.56 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import adapter from '@sveltejs/adapter-node';
import { mdsx } from 'mdsx';
import path from 'path';
import { mdsxConfig } from './mdsx.config.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: [mdsx(mdsxConfig)],
extensions: ['.svelte', '.md'],
kit: {
experimental: {
remoteFunctions: true,
tracing: {
server: true,
},
instrumentation: {
server: true,
},
},
adapter: adapter({
precompress: true,
}),
env: {
dir: path.resolve('./'),
publicPrefix: 'PUBLIC_',
},
csp: {
mode: 'hash',
},
csrf: {
trustedOrigins: ['https://eliteskyblock.com'],
},
alias: {
$ui: './src/components/ui',
$comp: './src/components',
$stores: './src/stores',
$lib: './src/lib',
$params: './src/params',
$content: './src/content',
$css: './src/app.css',
'$posts/*': '.velite/*'
},
version: {
name: process.env.PUBLIC_COMMIT_HASH ?? undefined,
pollInterval: 1000 * 60 // 1 minute
}
},
// Only way I found to hide warnings from node_modules that doesn't break everything
// vitePlugin: { exclude: ['**/node_modules/**'] } doesn't work
onwarn: (warning, handler) => {
if (warning.filename.includes('node_modules')) return;
handler(warning);
},
};
export default config;