mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-25 16:57:51 +08:00
fix(@angular/build): Ctrl + C
not terminating dev-server with SSR
This commit provides a workaround for https://github.com/angular/angular-cli/issues/28336, which occurs due to the interaction between `zone.js` and `listr2`. The issue prevents proper termination of the development server using Ctrl + C when dev-server. Closes: #28336
This commit is contained in:
parent
2a1107d998
commit
549c20a939
@ -334,6 +334,13 @@ export async function* serveWithVite(
|
|||||||
ssrMode = ServerSsrMode.InternalSsrMiddleware;
|
ssrMode = ServerSsrMode.InternalSsrMiddleware;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (browserOptions.progress !== false && ssrMode !== ServerSsrMode.NoSsr) {
|
||||||
|
// This is a workaround for https://github.com/angular/angular-cli/issues/28336, which is caused by the interaction between `zone.js` and `listr2`.
|
||||||
|
process.once('SIGINT', () => {
|
||||||
|
process.kill(process.pid);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Setup server and start listening
|
// Setup server and start listening
|
||||||
const serverConfiguration = await setupServer(
|
const serverConfiguration = await setupServer(
|
||||||
serverOptions,
|
serverOptions,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user