35 lines
733 B
JavaScript
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',
|
|
},
|
|
})],
|
|
}) |