Skip to content

Commit d660ba3

Browse files
committed
feat: enhance PWA configuration with auto-update, background color, and improved caching
1 parent 4effff2 commit d660ba3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

SortVision/vite.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ export default defineConfig({
1616
tailwindcss(),
1717
compression(),
1818
VitePWA({
19+
registerType: 'autoUpdate',
1920
includeAssets: ['favicon.svg', 'splash.svg', 'robots.txt'],
2021
manifest: {
2122
name: 'SortVision',
2223
short_name: 'SortVision',
2324
description: 'Interactive visualization of popular sorting algorithms',
2425
theme_color: '#0F172A',
26+
background_color: '#0F172A',
27+
display: 'standalone',
28+
scope: '/',
29+
start_url: '/',
2530
icons: [
2631
{
2732
src: '/favicon.svg',
@@ -38,6 +43,8 @@ export default defineConfig({
3843
]
3944
},
4045
workbox: {
46+
globPatterns: ['**/*.{js,css,html,ico,png,svg,json,vue,txt,woff2}'],
47+
navigateFallback: null,
4148
runtimeCaching: [
4249
{
4350
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,

0 commit comments

Comments
 (0)