Skip to content

Commit

Permalink
fix: sw不支持传入变量
Browse files Browse the repository at this point in the history
  • Loading branch information
ZvonimirSun committed Feb 21, 2024
1 parent 72f59ac commit f77619c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default defineConfig({
runtimeCaching: [
// api
{
urlPattern: ({ url }) => url.origin === config.apiOrigin,
urlPattern: ({ url }) => url.origin === 'https://api.iszy.xyz',
handler: 'NetworkFirst',
options: {
cacheName: `${config.key}-api`,
Expand All @@ -117,7 +117,7 @@ export default defineConfig({
},
// cdn
{
urlPattern: ({ url }) => url.hostname.endsWith(config.cdnHost),
urlPattern: ({ url }) => url.hostname.endsWith('cdn.iszy.xyz'),
handler: 'CacheFirst',
options: {
cacheName: `${config.key}-cdn`,
Expand Down

0 comments on commit f77619c

Please sign in to comment.