-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
50 lines (47 loc) · 1.06 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
50
import adapter from '@sveltejs/adapter-auto';
import preprocess from 'svelte-preprocess';
import { resolve } from 'path';
import { mdsvex } from 'mdsvex';
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;
console.log('process.env.NODE_ENV', dev);
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],
kit: {
trailingSlash: 'always',
serviceWorker: {
register: false
},
vite: {
build: {
sourcemap: true
},
resolve: {
alias: {
$components: resolve('src/_components'),
$elements: resolve('src/_elements'),
$utils: resolve('src/_utils'),
$dataSources: resolve('src/_dataSources'),
}
}
},
adapter: adapter()
},
preprocess: !dev
? [
preprocess({
postcss: true,
preserve: ['ld+json']
}),
mdsvex(mdsvexConfig)
]
: [
preprocess({
preserve: ['ld+json']
}),
mdsvex(mdsvexConfig)
]
};
export default config;