Start typing to search...
No results for ""
This guide explains how to use the Vite Development Server with Hot Module Replacement (HMR) for fast, real-time development.
Run:
npm run dev
Expected output:
Keep this terminal running while you develop.
Hot Module Replacement (HMR) updates your application in the browser without reloading the page.
cd /path/to/kivicare-clinic-management-system
npm run dev
Visit your WordPress dashboard page where KiviCare loads:
http://your-site.local/kivicare-dashboard
Press F12 or Ctrl + Shift + I.
Verify:
Example
export const Dashboard = () => {
return <h1>My Custom Dashboard</h1>;
};
Save → the browser updates instantly.
Located in vite.config.js:
export default {
server: {
host: 'localhost',
port: 8080,
cors: true,
hmr: {
protocol: 'ws',
host: 'localhost',
}
}
}
server: { port: 3000 }
server: {
host: '0.0.0.0',
port: 8080,
}
http://YOUR-IP:8080
Press:
Fix:
or change the port in vite.config.js.
npm installwindow.kc_frontend exists| Feature | Dev Server | Production |
|---|---|---|
| HMR | ✅ | ❌ |
| Source Maps | ✅ | Optional |
| File Size | Large | Optimized |
| Performance | Slower | Faster |
| Use Case | Development | Deployment |
Press h while the server runs:
export default {
server: {
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
}
}
}
}
Start:
npm run dev
Stop:
Kill port:
npx kill-port 8080
Next → Building for Production
Start typing to search...
No results for ""