-
Notifications
You must be signed in to change notification settings - Fork 2
/
svelte.config.js
40 lines (36 loc) · 868 Bytes
/
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
import preprocess from 'svelte-preprocess';
import path from 'path';
import vercel from '@sveltejs/adapter-vercel';
import fs from 'fs';
const mediaQueries = fs.readFileSync('./src/styles/media.pcss').toString();
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
compilerOptions: {
hydratable: true,
},
preprocess: preprocess({
postcss: {
prependData: mediaQueries,
},
}),
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
adapter: vercel(),
ssr: true,
vite: {
build: {
minify: 'terser',
},
hydratable: true,
resolve: {
alias: {
src: path.resolve('./src'),
},
},
},
},
};
export default config;