test-pwa/vite.config.js
Melaine Gérard 398319d763
bricolage
2024-09-16 13:24:55 +02:00

35 lines
733 B
JavaScript

import { VitePWA } from 'vite-plugin-pwa';
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [VitePWA({
registerType: 'autoUpdate',
injectRegister: false,
pwaAssets: {
disabled: false,
config: true,
},
manifest: {
name: 'Test PWA',
short_name: 'Test',
description: 'A sample PWA for some testings',
theme_color: '#ffffff',
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg,png,ico}'],
cleanupOutdatedCaches: true,
clientsClaim: true,
},
devOptions: {
enabled: false,
navigateFallback: 'index.html',
suppressWarnings: true,
type: 'module',
},
})],
})