From 489ae9a18e86210facc6bc62bf64f15983e0a11f Mon Sep 17 00:00:00 2001 From: JavaZero <71128095+JavaZeroo@users.noreply.github.com> Date: Wed, 23 Jul 2025 11:27:43 +0800 Subject: [PATCH] fix build base path for PR previews --- vite.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vite.config.js b/vite.config.js index 6b9f2b9..bdfb773 100644 --- a/vite.config.js +++ b/vite.config.js @@ -5,6 +5,11 @@ import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ + // Use a relative base path so the built site works + // when deployed to subfolders such as PR previews. + // This still works for the main site hosted at the + // repository root. + base: './', plugins: [react()], build: { outDir: 'dist',