Files
tools-app/vite.config.js
Grzegorz Kucmierz 0037fcea0c
All checks were successful
Deploy to Production / deploy (push) Successful in 7s
feat: enable window-controls-overlay and make header draggable
2026-02-27 00:35:56 +00:00

49 lines
1.3 KiB
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
import packageJson from './package.json'
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.svg'],
manifest: {
name: 'Tools App',
short_name: 'Tools',
description: 'A collection of useful tools',
theme_color: '#4facfe',
background_color: '#242424',
display: 'standalone',
display_override: ['window-controls-overlay'],
orientation: 'portrait',
icons: [
{
src: 'favicon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'any maskable'
}
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}'],
cleanupOutdatedCaches: true,
clientsClaim: true,
skipWaiting: true
},
devOptions: {
enabled: true,
/* when using generateSW the PWA plugin will switch to classic */
type: 'module',
navigateFallback: 'index.html',
}
})
],
define: {
'__APP_VERSION__': JSON.stringify(packageJson.version)
}
})