From 63e6b952278e43a3f0d98d2b0bfd1c1ee7d42d33 Mon Sep 17 00:00:00 2001 From: Innei Date: Sun, 27 Oct 2024 21:34:38 +0800 Subject: [PATCH 1/4] chore: release v0.1.1-beta.1 (#1182) Signed-off-by: Innei --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6730ad84a..a46ffb670 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Follow", "type": "module", - "version": "0.1.1-beta.0", + "version": "0.1.1-beta.1", "private": true, "packageManager": "pnpm@9.11.0", "description": "Next generation information browser", From c683bdaef63716659ca78875022ff38350e50b82 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 28 Oct 2024 12:53:08 +0800 Subject: [PATCH 2/4] fix: remove cache-control header (#1202) Signed-off-by: Innei --- plugins/vite/deps.ts | 4 +--- vercel.json | 45 +------------------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/plugins/vite/deps.ts b/plugins/vite/deps.ts index 2c01f2d2c..a152f20a2 100644 --- a/plugins/vite/deps.ts +++ b/plugins/vite/deps.ts @@ -13,9 +13,7 @@ export function createDependencyChunksPlugin(dependencies: string[][]): Plugin { outputConfig.manualChunks = outputConfig.manualChunks || {} outputConfig.assetFileNames = "assets/[name].[hash:6][extname]" outputConfig.chunkFileNames = (chunkInfo) => { - return chunkInfo.name.startsWith("vendor/") - ? "[name].[hash:9].js" - : "assets/[name].[hash].js" + return chunkInfo.name.startsWith("vendor/") ? "[name]-[hash].js" : "assets/[name]-[hash].js" } const manualChunks = Array.isArray(output) ? output[0].manualChunks : output.manualChunks diff --git a/vercel.json b/vercel.json index 59fed151e..a5bbdfb07 100644 --- a/vercel.json +++ b/vercel.json @@ -37,48 +37,5 @@ "permanent": true } ], - "headers": [ - { - "source": "/vendor/(.*)", - "headers": [ - { - "key": "Cache-Control", - "value": "public, max-age=604800, immutable" - }, - { - "key": "CDN-Cache-Control", - "value": "max-age=604800" - }, - { - "key": "Vercel-CDN-Cache-Control", - "value": "max-age=604800" - }, - { - "key": "Cloudflare-CDN-Cache-Control", - "value": "max-age=604800" - } - ] - }, - { - "source": "/assets/(.*)", - "headers": [ - { - "key": "Cache-Control", - "value": "public, max-age=604800, immutable" - }, - { - "key": "CDN-Cache-Control", - "value": "max-age=604800" - }, - { - "key": "Vercel-CDN-Cache-Control", - "value": "max-age=604800" - }, - { - "key": "Cloudflare-CDN-Cache-Control", - "value": "max-age=604800" - } - ] - } - ] + "headers": [] } From c954d61f074e282a9a86cbf1d1546748871c20e7 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 28 Oct 2024 13:09:09 +0800 Subject: [PATCH 3/4] fix: vercel rewrite config (#1203) Signed-off-by: Innei --- vercel.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vercel.json b/vercel.json index a5bbdfb07..acb63078f 100644 --- a/vercel.json +++ b/vercel.json @@ -20,6 +20,10 @@ "source": "/external-dist/:path*", "destination": "https://follow-external-ssr.vercel.app/:path*" }, + { + "source": "/dist-external/:path*", + "destination": "https://follow-external-ssr.vercel.app/:path*" + }, { "source": "/((?!assets|vendor|locales/).*)", "destination": "/index.html" From 488e8effc6f00769df7dbf68d4e6d1e4e950b8e7 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 28 Oct 2024 13:20:11 +0800 Subject: [PATCH 4/4] fix: assets rewrite (#1204) Signed-off-by: Innei --- vercel.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vercel.json b/vercel.json index acb63078f..786a896b6 100644 --- a/vercel.json +++ b/vercel.json @@ -18,14 +18,14 @@ }, { "source": "/external-dist/:path*", - "destination": "https://follow-external-ssr.vercel.app/:path*" + "destination": "https://follow-external-ssr.vercel.app/external-dist/:path*" }, { "source": "/dist-external/:path*", - "destination": "https://follow-external-ssr.vercel.app/:path*" + "destination": "https://follow-external-ssr.vercel.app/dist-external/:path*" }, { - "source": "/((?!assets|vendor|locales/).*)", + "source": "/((?!assets|vendor|locales|dist-external|external-dist/).*)", "destination": "/index.html" } ],