If we use nest webpack compiler and watchAssets flag is true, we can't exit a process created by nest start command because watchAssets listener is separated from bootstrap process. In the result, It's uncomfortable to use nest as command line tools using webpack, given if like nest-commander.
The process isn't exited unless you send signal INT
Expected behavior
When process.exit() calls from somewhere of entry files the nest start process should stop.
Package version
10.0.1
NestJS version
10.0.1
Node.js version
18.15.0
In which operating systems have you tested?
[X] macOS
[ ] Windows
[ ] Linux
Other
I already suggest a way to fix this bug in the PR.
Also chokidar listener can't listen to complete all copied processes. So if watchAssets: false specified, I think its' better that nest's logic fallback to sync process and I did in it.
Is there an existing issue for this?
Current behavior
If we use nest webpack compiler and watchAssets flag is true, we can't exit a process created by
nest start
command because watchAssets listener is separated from bootstrap process. In the result, It's uncomfortable to use nest as command line tools using webpack, given if like nest-commander.See: ( https://github.com/tkow/nest-watch-assets-demo/blob/master/src/main.ts )
Minimum reproduction code
https://github.com/tkow/nest-watch-assets-demo
Steps to reproduce
Expected behavior
When process.exit() calls from somewhere of entry files the nest start process should stop.
Package version
10.0.1
NestJS version
10.0.1
Node.js version
18.15.0
In which operating systems have you tested?
Other
I already suggest a way to fix this bug in the PR. Also chokidar listener can't listen to complete all copied processes. So if watchAssets: false specified, I think its' better that nest's logic fallback to sync process and I did in it.