When run project (F5) backend project open in actual chrome but react open new instance of Chrome
Press Ctrl-F5 to start the application without debugging.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
I have react project with net core api backend
When run project (F5) backend project open in actual chrome but react open new instance of Chrome
I want to use existing instance of chrome. Any ideas? Thanks
package.json:
{
"name": "reactapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^5.1.3",
"jquery": "^3.6.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"http-proxy-middleware": "^2.0.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-bootstrap": "^0.26.1",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"reactstrap": "^9.1.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "set HTTPS=true&&react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prestart": "node aspnetcore-https && node aspnetcore-react"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint-config-react-app": "^7.0.1",
"jest-editor-support": "^31.0.1"
}
}
project:
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/0.5.74-alpha">
<PropertyGroup>
<StartupCommand>set BROWSER=none&&npm start</StartupCommand>
<JavaScriptTestRoot>src\</JavaScriptTestRoot>
<JavaScriptTestFramework>Jest</JavaScriptTestFramework>
<!-- Command to run on project build -->
<BuildCommand></BuildCommand>
<!-- Command to create an optimized build of the project that's ready for publishing -->
<ProductionBuildCommand>npm run build</ProductionBuildCommand>
<!-- Folder where production build objects will be placed -->
<BuildOutputFolder>$(MSBuildProjectDirectory)\build</BuildOutputFolder>
</PropertyGroup>
</Project>
When run project (F5) backend project open in actual chrome but react open new instance of Chrome
Press Ctrl-F5 to start the application without debugging.
I had the same issue with new project from template "React And ASP.NET Core (Preview)" in VS2022 - 17.6.2. I have found that in project "reactapp", in folder ".vscode", there is also file "launch.json". You can edit this file OR set the "reactapp" as startup project then choose preferred configuration.