-
-
Notifications
You must be signed in to change notification settings - Fork 248
/
vite.config.ts
77 lines (74 loc) · 1.73 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { svelte } from '@sveltejs/vite-plugin-svelte';
import UnpluginIcons from 'unplugin-icons/vite';
import { defineConfig } from 'vite';
import { imagetools } from 'vite-imagetools';
import { VitePWA } from 'vite-plugin-pwa';
import { browserslistToTargets } from 'lightningcss';
import browserslist from 'browserslist';
import { prefetch } from './prefetch-plugin';
export default defineConfig({
plugins: [
svelte(),
prefetch(),
UnpluginIcons({ autoInstall: true, compiler: 'svelte' }),
VitePWA({
includeAssets: [
'robots.txt',
'app-icons/finder/32.png',
'cover-image.png',
'cursors/(normal|link|text|help)-select.svg',
'**/*.mp3',
],
manifest: {
name: 'Mac OS Monterey Svelte Web',
short_name: 'macOS Svelte',
theme_color: '#ffffff',
description: 'Mac OS Monterey Web written in Svelte',
icons: [
{
src: 'app-icons/finder/128.png',
sizes: '128x128',
type: 'image/png',
},
{
src: 'app-icons/finder/192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'app-icons/finder/256.png',
sizes: '256x256',
type: 'image/png',
},
{
src: 'app-icons/finder/512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'app-icons/finder/512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
}),
imagetools({}),
],
resolve: {
alias: {
'🍎': new URL('./src/', import.meta.url).pathname,
},
},
build: {
minify: 'terser',
cssMinify: 'lightningcss',
},
css: {
transformer: 'lightningcss',
lightningcss: {
targets: browserslistToTargets(browserslist('defaults, not IE 11, not IE_Mob 11, not dead')),
},
},
});