Closed astrassburg closed 8 months ago
Well, it seems to work well for me. I just have one question. Is it possible to make the new classes private or internal? I don't think it's necessary for them to be accessible outside the library.
Sure, I made the change. While classes in a namespace can't be explicitly marked private or internal, removing the public modifier does what we want.
This PR removes the Powershell.exe dependency for Windows platforms as well as the spawned script to poll and kill the Vite process. Some organizations block Powershell, and this change seems like it could benefit the community of users by reducing some complexity and giving the child process management back to the OS.
The new ChildProcessTracker class registers a Job object (https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects) to allow the spawned Vite process to be terminated when the application terminates regardless of the manner of termination.
Tested on:
Windows 10 Ubuntu 22.04
The Ubuntu testing was just to ensure the platform-specific calls didn't cause build or runtime problems on other platforms.