Comments (1)
- Go to the Run and Debug view (4-th icon with bug and play button)
- Select the create a launch.json file link to create a launch.json debugger configuration file
- Choose Web App (Chrome) from the Select debugger dropdown list
This will create a launch.json file in a new .vscode folder in your project which includes a configuration to launch the website.
Your launch.json should look like this:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
I see you are using env-cmd package which sets environmental variables such as PORT, the one is located in your launch.json file at "url" option — 8080. Your launch.json's url's port must be the same as the port your app is running at because a Chrome instance is attached to an already running app.
- If .env.a-env contains PORT definition then copy its value and replace 8080 with it in launch.json file.
- If .env.a-env does not contain PORT definition then replace 8080 with 3000 (which is the default port CRA apps running at) in launch.json file.
Now you only have to run your app. Follow these steps:
- Execute npm run start or yarn start.
- Wait for the app to compile. You will see this output in your terminal shell (hence the port number):
Compiled successfully!
You can now view my-app in the browser.
Local: http://localhost:3000
- Press F5 or go to the Run and Debug view and then press green play button that says "Launch Chrome against localhost".
from react-app-rewired.
Related Issues (20)
- Combine react-rewired start command with sst start command?
- How to return multiple webpack configurations properly? HOT 1
- Trouble to start the dev server HOT 2
- react-scripts replace to react-app-rewired, but TS error is not presented
- Getting CRA error when trying to run jest test runner after installing recat-app-rewired
- how to ignore less file's image url path HOT 1
- How to modify css-loader options?
- Getting error when integrating module federation Plugin
- Override webpackEnv used in CRA config
- Error Running react-app-rewired build && compress-cra on Amazon Linux
- Build Failed using react-app-rewired HOT 3
- why could not found the module when using custom path
- when I run npm start I got some error its existing project i want to run in my system HOT 4
- Problem Reload Page
- Stuck on Creating an optimized production build... HOT 3
- scss solution HOT 1
- hardcoded NODE_ENV production? HOT 2
- Can I override "config-overrides.js"? HOT 3
- npm run build doesn't exit after successful completion HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-app-rewired.