chore: pwa auto update
Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
		
							parent
							
								
									f02a816eaa
								
							
						
					
					
						commit
						66c569f886
					
				| @ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||||||
| 
 | 
 | ||||||
| ## Next | ## Next | ||||||
| - [feat] [humans.txt](/humans.txt) | - [feat] [humans.txt](/humans.txt) | ||||||
|  | - [feat] pwa auto update on new changes | ||||||
| 
 | 
 | ||||||
| ## 1.5.1 | ## 1.5.1 | ||||||
| - [feat] switched back to history mode (no more '#' in url) | - [feat] switched back to history mode (no more '#' in url) | ||||||
|  | |||||||
| @ -20,7 +20,8 @@ if (process.env.NODE_ENV === 'production') { | |||||||
|       console.log('New content is downloading.') |       console.log('New content is downloading.') | ||||||
|     }, |     }, | ||||||
|     updated () { |     updated () { | ||||||
|       console.log('New content is available; please refresh.') |       console.log('New content is available; hard refresh.'); | ||||||
|  |       window.location.reload(true); | ||||||
|     }, |     }, | ||||||
|     offline () { |     offline () { | ||||||
|       console.log('No internet connection found. App is running in offline mode.') |       console.log('No internet connection found. App is running in offline mode.') | ||||||
|  | |||||||
| @ -19,5 +19,11 @@ module.exports = { | |||||||
|         }) |         }) | ||||||
|       ] |       ] | ||||||
|     } |     } | ||||||
|  |   }, | ||||||
|  |   pwa: { | ||||||
|  |     workboxOptions: { | ||||||
|  |       skipWaiting: true, | ||||||
|  |       clientsClaim: true, | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user