Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuangs committed Nov 14, 2024
1 parent f5f706d commit e873348
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/frontend/quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,6 @@ module.exports = configure(function (ctx) {
pwa: {
workboxPluginMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest'
workboxOptions: {}, // only for GenerateSW
runtimeCaching: [
{
urlPattern: new RegExp('/public/'),
handler: 'NetworkOnly'
},
{
urlPattern: new RegExp('/bg/'),
handler: 'NetworkOnly'
},
{
urlPattern: /\/api\/.*/,
handler: 'NetworkFirst',
options: {
cacheableResponse: {
statuses: [0, 200]
}
}
}
],

manifest: {
name: 'Olares',
Expand Down
7 changes: 7 additions & 0 deletions packages/frontend/src-pwa/custom-service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ registerRoute(
]
})
);

registerRoute(
({ url }) => url.pathname.startsWith('/public/'),
new NetworkOnly()
);

registerRoute(({ url }) => url.pathname.startsWith('/bg/'), new NetworkOnly());

0 comments on commit e873348

Please sign in to comment.