-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8bfa23
commit 09f3085
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
// https://vite.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
define: { | ||
'process.env': process.env, // Pass environment variables explicitly | ||
}, server: { | ||
port: process.env.PORT || 3000, // Use Render's PORT variable or default to 3000 | ||
host: '0.0.0.0', // Bind to all network interfaces | ||
'process.env': process.env, | ||
}, | ||
server: { | ||
port: process.env.PORT || 3000, | ||
host: '0.0.0.0', | ||
}, | ||
preview: { | ||
port: process.env.PORT || 3000, // Use Render's PORT variable or default to 3000 | ||
host: '0.0.0.0', // Bind to all network interfaces | ||
port: process.env.PORT || 3000, | ||
host: '0.0.0.0', | ||
}, | ||
}) | ||
base: '/', // Use '/' for root deployment | ||
}); |