|
@@ -62,31 +62,32 @@ export default defineConfig({
|
|
|
VitePWA({
|
|
|
registerType: 'autoUpdate',
|
|
|
includeAssets: ['./logo.png'],
|
|
|
- // workbox: {
|
|
|
- // runtimeCaching: [
|
|
|
- // {
|
|
|
- // urlPattern: /(.*?)\.(js|css|ts|tsx|html)/, // js /css /ts静态资源缓存
|
|
|
- // handler: 'NetworkOnly',
|
|
|
- // options: {
|
|
|
- // cacheName: 'js-css-cache'
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // urlPattern: /.*\.html.*/,
|
|
|
- // handler: 'NetworkOnly',
|
|
|
- // options: {
|
|
|
- // cacheName: 'wisbayar-html',
|
|
|
- // expiration: {
|
|
|
- // maxEntries: 20,
|
|
|
- // maxAgeSeconds: 30 * 24 * 60 * 60
|
|
|
- // },
|
|
|
- // cacheableResponse: {
|
|
|
- // statuses: [200]
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // },
|
|
|
+ workbox: {
|
|
|
+ skipWaiting: true
|
|
|
+ // runtimeCaching: [
|
|
|
+ // {
|
|
|
+ // urlPattern: /(.*?)\.(js|css|ts|tsx|html)/, // js /css /ts静态资源缓存
|
|
|
+ // handler: 'NetworkOnly',
|
|
|
+ // options: {
|
|
|
+ // cacheName: 'js-css-cache'
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // urlPattern: /.*\.html.*/,
|
|
|
+ // handler: 'NetworkOnly',
|
|
|
+ // options: {
|
|
|
+ // cacheName: 'wisbayar-html',
|
|
|
+ // expiration: {
|
|
|
+ // maxEntries: 20,
|
|
|
+ // maxAgeSeconds: 30 * 24 * 60 * 60
|
|
|
+ // },
|
|
|
+ // cacheableResponse: {
|
|
|
+ // statuses: [200]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ },
|
|
|
manifest: {
|
|
|
name: '酷乐秀-音乐数字课堂',
|
|
|
short_name: '音乐数字课堂',
|