File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1- import { useRegisterSW } from 'virtual:pwa-register/solid'
2- import { createSignal , JSX , Show } from 'solid-js'
1+ import { JSX , Show } from 'solid-js'
32import { preventGlobalTouchAttrs } from 'src/components/real-button/use-global-touch'
3+ import { useRegisterSW } from 'virtual:pwa-register/solid'
44
55export interface ReloadPromptProps extends JSX . HTMLAttributes < HTMLDivElement > {
66 //
@@ -49,7 +49,11 @@ export const ReloadPrompt = (props: ReloadPromptProps) => {
4949 >
5050 Reload
5151 </ button >
52- < button class = "b-0 cusor-pointer rd-1 px-2 py-1" onClick = { handleClose } >
52+ < button
53+ class = "b-0 cusor-pointer rd-1 px-2 py-1"
54+ onClick = { handleClose }
55+ onTouchEnd = { handleClose }
56+ >
5357 Skip
5458 </ button >
5559 </ div >
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import {fileURLToPath, URL} from 'node:url'
44import unoCss from 'unocss/vite'
55
66export default defineConfig ( {
7+ server : {
8+ prerender : {
9+ routes : [ '/' ] ,
10+ } ,
11+ } ,
712 vite : {
813 build : {
914 minify : false ,
@@ -26,6 +31,10 @@ export default defineConfig({
2631 handler : 'NetworkFirst' ,
2732 options : {
2833 cacheName : 'html-cache' ,
34+ networkTimeoutSeconds : 3 ,
35+ precacheFallback : {
36+ fallbackURL : '/index.html' ,
37+ } ,
2938 } ,
3039 urlPattern : ( { request} ) => request . destination === 'document' ,
3140 } ,
@@ -41,6 +50,9 @@ export default defineConfig({
4150 handler : 'CacheFirst' ,
4251 options : {
4352 cacheName : 'image-cache' ,
53+ expiration : {
54+ maxAgeSeconds : 2_592_000 ,
55+ } ,
4456 } ,
4557 urlPattern : ( { request} ) => [ 'image' ] . includes ( request . destination ) ,
4658 } ,
You can’t perform that action at this time.
0 commit comments