-
Notifications
You must be signed in to change notification settings - Fork 31
/
svelte.config.js
49 lines (45 loc) · 1.13 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
43
44
45
46
47
48
49
import adapter from '@sveltejs/adapter-vercel';
import preprocess from 'svelte-preprocess';
import { mdsvex } from 'mdsvex';
import { resolve } from 'path';
import mdsvexConfig from './mdsvex.config.js';
//todo this needs to get checked on the build rigs
const dev = process.env.NODE_ENV === 'development' ? true : false;
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],
kit: {
serviceWorker: {
register: false
},
adapter: adapter(),
alias: {
$components: resolve('./src/_components'),
$elements: resolve('./src/_elements'),
$utils: resolve('./src/_utils'),
$dataSources: resolve('./src/_dataSources'),
$stores: resolve('./src/_stores'),
$machines: resolve('./src/_machines'),
$blog: resolve('./src/_blog')
},
version: {
name: process.env?.npm_package_version || '0.0.0'
}
},
preprocess: !dev
? [
preprocess({
sourceMap: true,
postcss: true,
preserve: ['ld+json']
}),
mdsvex(mdsvexConfig)
]
: [
preprocess({
preserve: ['ld+json']
}),
mdsvex(mdsvexConfig)
]
};
export default config;