The default port changed from 3000 to 5173, which breaks every script, proxy rule and README that had the old one written down.
// vite.config.js
export default defineConfig({
server: {
port: 5173,
strictPort: true, // fail rather than pick another
host: true, // listen on 0.0.0.0, for a container
},
})
// strictPort matters in a container: without it, a port
// clash makes Vite quietly choose 5174 and the published
// port maps to nothing.
strictPort is the setting worth adding regardless of the version, because the silent fallback produces a dev server that is running and unreachable — which reads as a networking problem rather than a port collision. host: true is required in a container and is the other thing everybody discovers by trial.