-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
35 lines (33 loc) · 1.04 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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA, VitePWAOptions } from 'vite-plugin-pwa'
import eslint from 'vite-plugin-eslint'
const viteConfig: Partial<VitePWAOptions> = {
registerType: 'autoUpdate',
manifestFilename: 'manifest.json',
manifest: {
background_color: '#010C1E',
theme_color: '#010C1E',
display: 'fullscreen',
description: 'Getting people to talk about the stuff that really matters',
icons: [
{
src: 'favicon.svg',
type: 'image/svg+xml',
purpose: 'any maskable',
sizes: '200x200'
},
{
src: 'google-touch-icon.png',
type: 'image/png',
sizes: '512x512'
}
],
}
}
export default defineConfig( {
plugins: [ react(), eslint(), VitePWA( viteConfig ) ],
define: { __BUILD_DATE__: `"${ new Date().toISOString() }"` },
build: { chunkSizeWarningLimit: 10000 }, // 10 MB
css: { preprocessorOptions: { scss: { api: 'modern-compiler' } } }, // fixing an update error message on 2024-09-28
} )