File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import react from "@vitejs/plugin-react-swc" ;
22import { defineConfig } from "vite" ;
33
4- // Log the base path for debugging
54console . log ( `Building DeepGit with BASE_PATH="${ process . env . BASE_PATH || "/deepgit" } "` ) ;
65
76export 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} ) ;
You can’t perform that action at this time.
0 commit comments