forked from betaflight/blackbox-log-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
52 lines (51 loc) · 1.63 KB
/
vite.config.js
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
import { VitePWA } from 'vite-plugin-pwa';
import pkg from './package.json';
/** @type {import('vite').UserConfig} */
export default {
build: {
sourcemap: true,
},
plugins: [
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,mcm,woff2}'],
// 5MB
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
},
includeAssets: ['favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
manifest: {
name: pkg.displayName,
short_name: pkg.productName,
description: pkg.description,
theme_color: '#ffffff',
icons: [
{
src: '/images/pwa/bf_icon_128.png',
sizes: '128x128',
type: 'image/png',
},
{
src: '/images/pwa/bf_icon_192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/images/pwa/bf_icon_256.png',
sizes: '256x256',
type: 'image/png',
},
],
file_handlers: [{
action: "/",
accept: {
"application/octet-stream": [".bbl", ".bfl"],
},
}],
},
}),
],
define: {
'__APP_VERSION__': JSON.stringify(pkg.version),
},
}