openpencil/vite/pwa.ts
Danila Poyarkov c3f5189f8f style: tighten import grouping
- Configure oxfmt custom import groups for workspace, app, package, and test aliases
- Keep type imports grouped with their matching source category instead of one global tail group
- Expand the format script to cover formatter config, Vite files, and scripts
2026-05-06 02:22:08 +03:00

31 lines
993 B
TypeScript

import { VitePWA } from 'vite-plugin-pwa'
export function openPencilPwaPlugin() {
return VitePWA({
registerType: 'autoUpdate',
devOptions: { enabled: false },
workbox: {
maximumFileSizeToCacheInBytes: 12 * 1024 * 1024,
globPatterns: ['**/*.{js,css,html,wasm,png,ico,ttf,webmanifest}'],
navigateFallback: '/index.html'
},
manifest: {
name: 'OpenPencil',
short_name: 'OpenPencil',
description: 'Open-source design editor',
display: 'standalone',
orientation: 'any',
start_url: '/',
scope: '/',
theme_color: '#1e1e1e',
background_color: '#1e1e1e',
categories: ['design', 'productivity'],
icons: [
{ src: '/pwa-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' },
{ src: '/pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'any' },
{ src: '/pwa-maskable-512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' }
]
}
})
}