Skip to content

Commit 7584da0

Browse files
handle custom domain for github pages
1 parent 59bfda4 commit 7584da0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

example/vite.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import { resolve } from "path";
44

55
const repoBase = "react-flow";
66

7+
const isCustomDomain = process.env.CUSTOM_DOMAIN === "true";
8+
79
export default defineConfig({
8-
base: process.env.GITHUB_PAGES === "true" ? `/${repoBase}/` : "/",
10+
base: isCustomDomain ? "/" : process.env.GITHUB_PAGES === "true" ? `/${repoBase}/` : "/",
911
plugins: [react()],
1012
build: {
1113
rollupOptions: {

0 commit comments

Comments
 (0)