-
Notifications
You must be signed in to change notification settings - Fork 1
/
svelte.config.js
44 lines (41 loc) · 1.16 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
import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';
import adapter from '@sveltejs/adapter-netlify';
import preprocess from 'svelte-preprocess';
import autoImport from 'vite-plugin-autoimport';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', ...mdsvexConfig.extensions],
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
preprocess(),
mdsvex(mdsvexConfig)
],
kit: {
adapter: adapter({
// if true, will split your app into multiple functions
// instead of creating a single one for the entire app
split: false
}),
vite: {
define: {
'process.env': {}
},
server: {
hmr: {
clientPort: process.env.HMR_HOST ? 443 : 24678,
host: process.env.HMR_HOST ? process.env.HMR_HOST.substring("https://".length) : "localhost"
}
},
plugins: [
autoImport({
components: ['./src/lib/components'],
include: ['**/*.svelte'],
exclude: ['**/node_modules/**']
})
]
}
}
};
export default config;