-
Notifications
You must be signed in to change notification settings - Fork 13
/
svelte.config.js
47 lines (42 loc) · 1.04 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
import preprocess from 'svelte-preprocess';
import imagePreprocessor from 'svimg';
import path from 'path';
import fs from 'fs';
import vercel from '@sveltejs/adapter-vercel';
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
preprocess: [
imagePreprocessor({
inputDir: 'static',
outputDir: 'static/g',
webp: true,
avif: true
}),
preprocess({
postcss: {
prependData: mediaQueries
}
})
],
kit: {
adapter: vercel(),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
vite: {
resolve: {
alias: {
src: path.resolve('./src'),
assets: path.resolve('./src/assets'),
components: path.resolve('./src/components'),
modules: path.resolve('./src/modules'),
models: path.resolve('./src/models'),
utils: path.resolve('./src/utils')
}
}
}
}
};
export default config;