Skip to content

Can ViteDevServerLauncher be embedded in a .net process #140

@myderr

Description

@myderr

I observed that the following code is used to start vite now

        var startInfo = new ProcessStartInfo(command, args)
        {
            CreateNoWindow = false,
            UseShellExecute = true,
            WindowStyle = ProcessWindowStyle.Normal,
            WorkingDirectory = Path.GetFullPath(workingDirectory),
        };

If UseShellExecute is set to false and the input and output streams are managed, can a dos window be reduced and IsViteDevelopmentServerRunning can also be removed? because vite has been started and stopped with the main process

        var startInfo = new ProcessStartInfo("node", args)
        {
            CreateNoWindow = true,
            UseShellExecute = false,
            RedirectStandardInput = true,
            RedirectStandardOutput = true,
            RedirectStandardError = true,
            WindowStyle = ProcessWindowStyle.Hidden, 
            WorkingDirectory = Path.GetFullPath(workingDirectory),
        };

For example, the following figure shows that I cannot stop Vite when it stops, so I cannot submit a pull request.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions