test-pwa/vite.config.js

35 lines
733 B
JavaScript
Raw Permalink Normal View History

2024-09-16 11:24:55 +00:00
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',
},
})],
})