-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
85 lines (84 loc) · 2.15 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
78
79
80
81
82
83
84
85
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
import svgrPlugin from 'vite-plugin-svgr'
// import babel from 'vite-plugin-babel'
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 5175,
},
plugins: [
svgrPlugin({
svgrOptions: {
icon: true,
// ...svgr options (https://react-svgr.com/docs/options/)
},
}),
VitePWA({
workbox: {
sourcemap: true,
globPatterns: [
'**/*.{js,jsx,ts,tsx,css,html,ico,png,svg,webp,json,woff2,woff}',
],
maximumFileSizeToCacheInBytes: 1000000000,
},
registerType: 'autoUpdate',
includeAssets: [
'favicon.svg?react',
'favicon.ico',
'robots.txt',
'favicon_192.png',
'favicon_512.webp',
'favicon_512.png',
],
// https://developer.mozilla.org/en-US/docs/Web/Manifest
manifest: {
name: 'vermehrung.ch',
short_name: 'vermehrung',
description: 'Bedrohte Pflanzenarten vermehren',
background_color: '#2e0c58',
theme_color: '#2e0c58',
display: 'minimal-ui',
icons: [
{
src: '/favicon.svg?react',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'maskable any',
},
{
src: '/favicon_192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/favicon_512.webp',
sizes: '512x512',
type: 'image/webp',
},
{
src: '/favicon_512.png',
sizes: '512x512',
type: 'image/png',
},
],
categories: ['business', 'productivity'],
screenshots: [],
orientation: 'portrait',
},
devOptions: {
//enabled: true,
},
}),
react({
jsxImportSource: '@emotion/react',
babel: {
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
],
},
}),
],
})