fix: Auto-detect base path for Cloudflare vs GitHub Pages

This commit is contained in:
LC mac
2026-01-30 01:44:53 +08:00
parent 46982794cc
commit faf58dc49d

View File

@@ -12,7 +12,7 @@ const gitHash = execSync('git rev-parse --short HEAD').toString().trim()
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
base: '/seedpgp-web-app/', base: process.env.CF_PAGES ? '/' : '/seedpgp-web-app/',
build: { build: {
outDir: 'dist', outDir: 'dist',
emptyOutDir: false, emptyOutDir: false,