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
Родитель 96d7f85327
Коммит aeabbdcada
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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);