Stop create-react-app from opening an extra browser tab (pointed to the wrong port)

This commit is contained in:
Steve Sanderson
2017-11-13 12:51:18 +00:00
parent 96d7f85327
commit aeabbdcada

View File

@@ -59,7 +59,8 @@ namespace Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer
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(
sourcePath, npmScriptName, null, envVars);