-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
32 lines (30 loc) · 885 Bytes
/
vite.config.ts
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
import { enhancedImages } from '@sveltejs/enhanced-img';
import { sveltekit } from '@sveltejs/kit/vite';
import { FileSystemIconLoader } from 'unplugin-icons/loaders';
import Icons from 'unplugin-icons/vite';
import mkcert from 'vite-plugin-mkcert';
import { purgeCss } from 'vite-plugin-tailwind-purgecss';
import { defineConfig } from 'vitest/config';
import process from "node:process";
const useMkcert = process.env.NODE_ENV === 'development';
export default defineConfig({
optimizeDeps: {
entries: ['src/**/*.svelte'],
},
plugins: [
enhancedImages(),
sveltekit(),
useMkcert ? mkcert() : null,
Icons({
compiler: 'svelte',
autoInstall: true,
customCollections: {
custom: FileSystemIconLoader('src/lib/assets/images/icons'),
},
}),
purgeCss(),
],
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
},
});