mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Stop create-react-app from opening an extra browser tab (pointed to the wrong port)
This commit is contained in:
@@ -59,7 +59,8 @@ namespace Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer
|
|||||||
|
|
||||||
var envVars = new Dictionary<string, string>
|
var envVars = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{ "PORT", portNumber.ToString() }
|
{ "PORT", portNumber.ToString() },
|
||||||
|
{ "BROWSER", "none" }, // We don't want create-react-app to open its own extra browser window pointing to the internal dev server port
|
||||||
};
|
};
|
||||||
var npmScriptRunner = new NpmScriptRunner(
|
var npmScriptRunner = new NpmScriptRunner(
|
||||||
sourcePath, npmScriptName, null, envVars);
|
sourcePath, npmScriptName, null, envVars);
|
||||||
|
|||||||
Reference in New Issue
Block a user