From f8d62838b177e6868b591593509aff47950b517c Mon Sep 17 00:00:00 2001 From: sprout2000 Date: Tue, 11 Jun 2024 17:23:08 +0900 Subject: [PATCH] perf: Update plugins.VitePWA --- vite.config.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index bc170d7..f53e3b1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,6 +8,11 @@ export default defineConfig({ plugins: [ react(), VitePWA({ + registerType: 'autoUpdate', + workbox: { + clientsClaim: true, + skipWaiting: true, + }, manifest: { name: 'Todo App (PWA)', short_name: 'Todo', @@ -18,6 +23,18 @@ export default defineConfig({ orientation: 'portrait', theme_color: '#3f51b2', background_color: '#efeff4', + screenshots: [ + { + src: 'screen-shot.png', + sizes: '709x1400', + form_factor: 'narrow', + }, + { + src: 'screen-shot-wide.png', + sizes: '1278x1508', + form_factor: 'wide', + }, + ], icons: [ { src: 'icon-192x192.png',