In vite 2.3.8, ViteDevServer.close() will correctly just down the server. However https://github.com/vitejs/vite/commit/5999444496b6309460687b0769afad018aa21859 has changed this behaviour. npm install node main