Skip to content

Commit 88d049c

Browse files
committed
modify vite dev
1 parent 04dba29 commit 88d049c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vite.config.mts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import react from "@vitejs/plugin-react-swc";
22
import { defineConfig } from "vite";
33

4-
// Log the base path for debugging
54
console.log(`Building DeepGit with BASE_PATH="${process.env.BASE_PATH || "/deepgit"}"`);
65

76
export default defineConfig({
87
preview: {
9-
allowedHosts: ['deepgit-1.onrender.com'],
8+
allowedHosts: ["deepgit-1.onrender.com"],
109
},
1110
base: process.env.BASE_PATH || "/deepgit",
1211
plugins: [react()],
1312
server: {
14-
host: "0.0.0.0", // Allows external access (required for Render)
15-
port: process.env.PORT ? parseInt(process.env.PORT) : 5173, // Use Render's assigned port or fallback to 5173
16-
strictPort: true, // Prevents Vite from using a different port if the default is unavailable
13+
host: "0.0.0.0",
14+
port: process.env.PORT ? parseInt(process.env.PORT) : 5173,
15+
strictPort: true,
16+
allowedHosts: ["deepgit-1.onrender.com"]
1717
},
1818
});

0 commit comments

Comments
 (0)