Skip to content

Commit 327be7f

Browse files
Fixed error 404
1 parent 3c305a7 commit 327be7f

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919

2020
<body>
2121
<div id="root"></div>
22-
<script type="module" src="./src/main.tsx"></script>
22+
<script type="module" src="/src/main.tsx"></script>
2323
</body>
2424
</html>

vite.config.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@ import react from "@vitejs/plugin-react-swc";
33
import path from "path";
44
import { componentTagger } from "lovable-tagger";
55

6-
// https://vitejs.dev/config/
76
export default defineConfig(({ mode }) => ({
8-
// Set the base path for GitHub Pages.
9-
// The value should be the name of your repository.
10-
base: "/jaystack.dev/",
11-
7+
base: mode === "development" ? "/" : "/jaystack.dev/",
128
plugins: [
139
react(),
14-
// This conditional plugin now works correctly because `mode` is
15-
// properly destructured from the function arguments.
16-
// It will only be active during development (`vite dev`).
1710
mode === "development" && componentTagger(),
1811
].filter(Boolean),
1912

@@ -23,7 +16,6 @@ export default defineConfig(({ mode }) => ({
2316
},
2417
},
2518

26-
// The server config is for local development and doesn't affect the build.
2719
server: {
2820
host: "::",
2921
port: 8080,

0 commit comments

Comments
 (0)