We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e1a00c commit 22663e6Copy full SHA for 22663e6
vite.config.js
@@ -0,0 +1,16 @@
1
+import { defineConfig } from "vite";
2
+
3
+export default defineConfig(({ mode }) => {
4
+ // Default for local dev
5
+ let base = "/";
6
7
+ // GitHub Actions sets GITHUB_REPOSITORY=owner/repo
8
+ if (process.env.GITHUB_REPOSITORY) {
9
+ const repo = process.env.GITHUB_REPOSITORY.split("/")[1];
10
+ base = `/${repo}/`;
11
+ }
12
13
+ return {
14
+ base,
15
+ };
16
+});
0 commit comments