-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathvite.config.js
More file actions
33 lines (31 loc) · 735 Bytes
/
Copy pathvite.config.js
File metadata and controls
33 lines (31 loc) · 735 Bytes
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
import path from 'path'
import { sveltePreprocess } from 'svelte-preprocess'
import adapter from '@sveltejs/adapter-static'
import { sveltekit } from '@sveltejs/kit/vite'
/** @type {import('vite').UserConfig} */
const config = {
plugins: [
sveltekit({
adapter: adapter(),
serviceWorker: {
register: true
},
compilerOptions: {
cssHash: ({ hash, css }) => `s-${hash(css)}`
},
preprocess: [
sveltePreprocess({
postcss: true
})
]
})
],
resolve: {
alias: {
'@root': path.resolve('./src'),
'@components': path.resolve('./src/lib/components'),
'@utils': path.resolve('./src/lib/utils')
}
}
}
export default config