-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
50 lines (42 loc) · 1.52 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-node';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
// Auto-preprocess mode - no need for specifying standlone SCSS preprocesors, etc.
// https://github.com/sveltejs/svelte-preprocess/blob/main/docs/preprocessing.md#auto-preprocessing
// sveltePreprocess()
preprocess({
scss: {
// We can use a path relative to the root because svelte-preprocess automatically adds
// it to `includePaths` if none is defined.
// This allows us to use the variables in our components - don't turn on unless really need it
// prependData: `@import 'src/styles/_variables.scss';`,
// Docs say renderSync is faster for Dart Sass which I am using
// https://github.com/sveltejs/svelte-preprocess/blob/main/docs/preprocessing.md#scss-sass
renderSync: true,
// Dart Sass recognizes 'expanded' and 'compressed'
outputStyle: 'expanded'
}
}),
// Standalone preprocessors go here for customized configurations.
// https://github.com/sveltejs/svelte-preprocess/blob/main/docs/preprocessing.md#stand-alone-processors
// scss(),
],
kit: {
adapter: adapter({
// default options are shown
out: 'build',
precompress: false,
env: {
host: 'HOST',
port: 'PORT'
}
}),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte'
}
};
export default config;