-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
71 lines (70 loc) · 1.65 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
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
import react from '@vitejs/plugin-react';
export default defineConfig({
test: {
environment: 'jsdom',
setupFiles: ['./setup.ts'],
include: ['./src/**/*.spec.edge.tsx'],
globals: true,
},
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
injectRegister: 'script',
includeAssets: ['apple-icon-180.png'],
manifest: {
icons: [
{
src: './src/assets/apple-icon-180.png',
sizes: '180x180',
type: 'image/png',
},
{
src: './src/assets/manifest-icon-192.maskable.png',
sizes: '192x192',
type: 'image/png',
},
{
src: './src/assets/manifest-icon-512.maskable.png',
sizes: '512x512',
type: 'image/png',
},
],
name: 'Getting Things Done',
short_name: 'GTD',
description: 'Your friendly task manager',
display: 'fullscreen',
scope: '/',
start_url: '/',
orientation: 'portrait',
theme_color: '#070F2B',
background_color: '#070F2B',
},
devOptions: {
enabled: false,
},
}),
],
preview: {
port: 8080,
},
server: {
host: true,
port: 8080,
},
build: {
rollupOptions: {
output: {
sourcemap: false,
manualChunks: {
router: ['react-router-dom', 'axios'],
css: ['styled-components'],
firebae: ['firebase/app', 'firebase/firestore'],
},
},
},
},
});