Allow all hosts for Vite development server in Replit environment
Configure vite.config.ts to set `allowedHosts: true` and update replit.md to document this change, enabling the development server to accept requests from Replit's dynamic proxy hostnames. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 67514a43-55bc-402d-96bf-6b8994c3e0fd Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/FjR2iCp Replit-Helium-Checkpoint-Created: true
This commit is contained in:
parent
88d621ccc1
commit
04cf84c4b7
2 changed files with 2 additions and 0 deletions
|
|
@ -59,6 +59,7 @@ npm start # Start production server
|
||||||
### Development
|
### Development
|
||||||
- The development server runs on **port 5000** (required for Replit's webview)
|
- The development server runs on **port 5000** (required for Replit's webview)
|
||||||
- Host is set to `0.0.0.0` to allow Replit proxy access
|
- Host is set to `0.0.0.0` to allow Replit proxy access
|
||||||
|
- `allowedHosts: true` configured to allow Replit's dynamic proxy hostnames
|
||||||
- Vite HMR is configured for proper hot reload in Replit environment
|
- Vite HMR is configured for proper hot reload in Replit environment
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ export default defineConfig(({ mode }) => ({
|
||||||
host: "0.0.0.0",
|
host: "0.0.0.0",
|
||||||
port: 5000,
|
port: 5000,
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
|
allowedHosts: true,
|
||||||
hmr: {
|
hmr: {
|
||||||
clientPort: 5000,
|
clientPort: 5000,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue