-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsvelte.config.js
54 lines (53 loc) · 1.37 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
51
52
53
54
import { preprocessMeltUI, sequence } from '@melt-ui/pp'
import preprocess from 'svelte-preprocess'
import nested from 'postcss-nested'
import postcssEnvFunction from 'postcss-env-function'
import minmax from 'postcss-media-minmax'
import postcssCustomMedia from 'postcss-custom-media'
import atImport from 'postcss-import'
import adapter from '@sveltejs/adapter-vercel'
/** @type {import('@sveltejs/kit').Config}*/
const config = {
preprocess: sequence([
preprocess({
postcss: {
prependData: `
@custom-media --below_small (width < env(--small_bp));
@custom-media --below_med (width < 700px);
@custom-media --below_large (width < 900px);
@custom-media --below_xlarge (width < 1200px);
@custom-media --above_small (width > env(--small_bp));
@custom-media --above_med (width > 700px);
@custom-media --above_large (width > 900px);
@custom-media --above_xlarge (width > 1200px);
`,
plugins: [
atImport,
postcssCustomMedia,
minmax,
nested,
postcssEnvFunction({
importFrom: [
{
environmentVariables: {
'--small_bp': '500px'
}
}
]
})
]
}
}),
preprocessMeltUI()
]),
kit: {
adapter: adapter(),
alias: {
$elements: './src/elements',
$utilities: './src/utilities',
$stores: './src/lib/stores',
$constants: './src/constants'
}
}
}
export default config