-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
36 lines (34 loc) · 776 Bytes
/
vite.config.ts
File metadata and controls
36 lines (34 loc) · 776 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
34
35
36
import { sveltekit } from '@sveltejs/kit/vite';
import extractorSvelte from '@unocss/extractor-svelte';
import { fileURLToPath } from 'node:url';
import unocss from 'unocss/vite';
import unoConfig from './uno.config';
import { defineConfig } from 'vite';
import { ViteToml as toml } from 'vite-plugin-toml';
const resolve = (path: string) => fileURLToPath(new URL(path, import.meta.url));
// https://vite.dev/config/
export default defineConfig({
server: {
fs: {
allow: [resolve('./content'), resolve('./uno.config.ts')]
}
},
define: {
unotheme: unoConfig.theme
},
resolve: {
alias: [
{
find: '$content',
replacement: resolve('./content')
}
]
},
plugins: [
unocss({
extractors: [extractorSvelte()]
}),
toml(),
sveltekit()
]
});