diff --git a/packages/vite/src/node/shortcuts.ts b/packages/vite/src/node/shortcuts.ts index 1528486b02112d..7e3f513ae6da4c 100644 --- a/packages/vite/src/node/shortcuts.ts +++ b/packages/vite/src/node/shortcuts.ts @@ -44,7 +44,7 @@ export function bindShortcuts( const onInput = async (input: string) => { // ctrl+c or ctrl+d if (input === '\x03' || input === '\x04') { - process.emit('SIGTERM') + await server.close().finally(() => process.exit(1)) return }