-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
61 lines (60 loc) · 1.63 KB
/
Copy pathvite.config.ts
File metadata and controls
61 lines (60 loc) · 1.63 KB
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
import path from 'path';
import babel from '@rolldown/plugin-babel';
import tailwindcss from '@tailwindcss/vite';
import react, { reactCompilerPreset } from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { VitePWA as pwa } from 'vite-plugin-pwa';
// https://vite.dev/config/
export default defineConfig({
base: process.env.GITHUB_PAGES ? `/${process.env.GITHUB_PAGES}/` : '/',
plugins: [
tailwindcss(),
react(),
babel({ presets: [reactCompilerPreset()] }),
pwa({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'apple-touch-icon-180x180.png', 'pwa-icon.svg'],
manifest: {
name: 'JSONLogs Viewer',
short_name: 'JSONLogsViewer',
description: 'View and analyse structured logs',
theme_color: '#1e293b',
background_color: '#0f172a',
display: 'standalone',
scope: './',
start_url: './',
icons: [
{
src: 'pwa-64x64.png',
sizes: '64x64',
type: 'image/png',
},
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'maskable-icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
},
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});