Skip to content

Commit 489ae9a

Browse files
committed
fix build base path for PR previews
1 parent a204e04 commit 489ae9a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vite.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import react from '@vitejs/plugin-react'
55

66
// https://vite.dev/config/
77
export default defineConfig({
8+
// Use a relative base path so the built site works
9+
// when deployed to subfolders such as PR previews.
10+
// This still works for the main site hosted at the
11+
// repository root.
12+
base: './',
813
plugins: [react()],
914
build: {
1015
outDir: 'dist',

0 commit comments

Comments
 (0)