From 81c7088975541ad388ab363678748f72416dcbdf Mon Sep 17 00:00:00 2001 From: ayoayco Date: Thu, 15 Aug 2024 21:15:12 +0200 Subject: [PATCH] feat: use astro-sw customRoutes & add build:preview script --- astro.config.mjs | 1 + package.json | 3 ++- pnpm-lock.yaml | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 673fb28..89b1ba9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -11,6 +11,7 @@ export default defineConfig({ serviceWorker({ path: './src/sw.js', assetCachePrefix: 'ayco-personal-site', + customRoutes: ['/threads'] }) ] }); diff --git a/package.json b/package.json index e3ac5db..623d6b2 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "astro build", "preview": "astro preview", "astro": "astro", + "build:preview": "astro build && astro preview", "deploy": "astro build && scp -r dist ayo@ayco.io:~/ayco.io-flask/", "copy:dist": "astro build && cp -R dist ../ayco.io-flask/" }, @@ -16,7 +17,7 @@ "@astro-reactive/form": "^0.10.0", "@astro-reactive/validator": "^0.5.0", "@astrojs/sitemap": "^3.1.6", - "@ayco/astro-sw": "^0.3.1", + "@ayco/astro-sw": "^0.5.0", "astro": "^4.14.2", "astro-github-stats": "^0.7.0", "astro-iconify": "^1.2.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3d5b81..015044d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^3.1.6 version: 3.1.6 '@ayco/astro-sw': - specifier: ^0.3.1 - version: 0.3.1 + specifier: ^0.5.0 + version: 0.5.0 astro: specifier: ^4.14.2 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==} engines: {node: ^18.17.1 || ^20.3.0 || >=21.0.0} - '@ayco/astro-sw@0.3.1': - resolution: {integrity: sha512-IK8nQ7zc+QkbqcvYaJKNtQ05pHl6uERVvo8fY9cafHZIQqPEbxFRiEM056C/4mCXTbbmlcvidsfWvpNbiyG+nw==} + '@ayco/astro-sw@0.5.0': + resolution: {integrity: sha512-anNaIOZdz5m4zKie52aePTVwO5YkNluHkqEGh6FpjS9D+W4RqWnWXDu613dMDsq3j97dXfvyPhmZaYZVJeiahQ==} engines: {node: '>=18.0.0'} '@babel/code-frame@7.24.7': @@ -2129,7 +2129,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@ayco/astro-sw@0.3.1': {} + '@ayco/astro-sw@0.5.0': {} '@babel/code-frame@7.24.7': dependencies: