-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
50 lines (46 loc) · 1.39 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-static'
import preprocess from 'svelte-preprocess'
import PostSCSS from 'postcss-scss'
import Import from 'postcss-import'
import AutoPrefixer from 'autoprefixer'
import Nested from 'postcss-nested'
import SimpleVars from 'postcss-simple-vars'
import Extend from 'postcss-extend-rule'
import CustomMedia from 'postcss-custom-media'
import MediaMinMax from 'postcss-media-minmax'
import CustomSelector from 'postcss-custom-selectors'
import { join, resolve } from 'path'
const prepend = join(resolve('./styles'), '_custom.scss')
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess({
scss: {
prependData: `@use "${prepend}";`
},
postcss: {
parser: PostSCSS.parse,
prependData: `@import "${prepend}";`,
plugins: [
AutoPrefixer(), Nested(),
SimpleVars(), Extend(),
Import(), CustomMedia(),
MediaMinMax(), CustomSelector()
]
}
}),
kit: {
adapter: adapter({
pages: 'build'
}),
files: {
assets: 'public',
routes: 'pages'
},
prerender: {
default: true
}
}
}
export default config