feat: exclude /threads from being cached

This commit is contained in:
Ayo Ayco 2024-08-16 13:35:17 +02:00
parent c2c1c1dae2
commit 139e16f0f6
3 changed files with 14 additions and 11 deletions

View file

@ -10,7 +10,10 @@ export default defineConfig({
sitemap(), sitemap(),
serviceWorker({ serviceWorker({
path: './src/sw.js', path: './src/sw.js',
assetCachePrefix: 'ayco-personal-site' assetCachePrefix: 'ayco-personal-site',
excludeRoutes: [
'/threads'
]
}) })
] ]
}); });

View file

@ -17,7 +17,7 @@
"@astro-reactive/form": "^0.10.0", "@astro-reactive/form": "^0.10.0",
"@astro-reactive/validator": "^0.5.0", "@astro-reactive/validator": "^0.5.0",
"@astrojs/sitemap": "^3.1.6", "@astrojs/sitemap": "^3.1.6",
"@ayco/astro-sw": "^0.5.1", "@ayco/astro-sw": "^0.6.1",
"astro": "^4.14.2", "astro": "^4.14.2",
"astro-github-stats": "^0.7.0", "astro-github-stats": "^0.7.0",
"astro-iconify": "^1.2.0" "astro-iconify": "^1.2.0"

View file

@ -18,8 +18,8 @@ importers:
specifier: ^3.1.6 specifier: ^3.1.6
version: 3.1.6 version: 3.1.6
'@ayco/astro-sw': '@ayco/astro-sw':
specifier: ^0.5.1 specifier: ^0.6.1
version: 0.5.1 version: 0.6.1
astro: astro:
specifier: ^4.14.2 specifier: ^4.14.2
version: 4.14.2(@types/node@22.3.0)(rollup@4.20.0)(typescript@5.5.4) version: 4.14.2(@types/node@22.3.0)(rollup@4.20.0)(typescript@5.5.4)
@ -75,8 +75,8 @@ packages:
resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==} resolution: {integrity: sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==}
engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0}
'@ayco/astro-sw@0.5.1': '@ayco/astro-sw@0.6.1':
resolution: {integrity: sha512-RFDJQK5IHYRPI+fo3Sd9gBh/gkJD1w8VYobc2ISwI0+khMf0qZ7PUbESigEtgKJ3YlB0FEQ9Hv9CdQAriiv0Kw==} resolution: {integrity: sha512-/D02L0bcw1E3H5EH/0vJxoXE6yP567gDeObwqJduOKMam1GUXU3hzLDykg17GOTNpWKQQ4VdlDYwn+nBllKqQQ==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
'@babel/code-frame@7.24.7': '@babel/code-frame@7.24.7':
@ -898,8 +898,8 @@ packages:
eastasianwidth@0.2.0: eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
electron-to-chromium@1.5.8: electron-to-chromium@1.5.9:
resolution: {integrity: sha512-4Nx0gP2tPNBLTrFxBMHpkQbtn2hidPVr/+/FTtcCiBYTucqc70zRyVZiOLj17Ui3wTO7SQ1/N+hkHYzJjBzt6A==} resolution: {integrity: sha512-HfkT8ndXR0SEkU8gBQQM3rz035bpE/hxkZ1YIt4KJPEFES68HfIU6LzKukH0H794Lm83WJtkSAMfEToxCs15VA==}
emoji-regex@10.3.0: emoji-regex@10.3.0:
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
@ -2129,7 +2129,7 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@ayco/astro-sw@0.5.1': {} '@ayco/astro-sw@0.6.1': {}
'@babel/code-frame@7.24.7': '@babel/code-frame@7.24.7':
dependencies: dependencies:
@ -2769,7 +2769,7 @@ snapshots:
browserslist@4.23.3: browserslist@4.23.3:
dependencies: dependencies:
caniuse-lite: 1.0.30001651 caniuse-lite: 1.0.30001651
electron-to-chromium: 1.5.8 electron-to-chromium: 1.5.9
node-releases: 2.0.18 node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.3) update-browserslist-db: 1.1.0(browserslist@4.23.3)
@ -2959,7 +2959,7 @@ snapshots:
eastasianwidth@0.2.0: {} eastasianwidth@0.2.0: {}
electron-to-chromium@1.5.8: {} electron-to-chromium@1.5.9: {}
emoji-regex@10.3.0: {} emoji-regex@10.3.0: {}