Skip to content

Local Development Setup

vivekweb2013 edited this page May 25, 2022 · 1 revision

Running the frontend module locally

Start the frontend react app with below command.

npm start

This will start the react app in the development mode.

Open http://localhost:3000 to view it in the browser.

Analyzing the bundle size

Source map explorer analyzes JavaScript bundles using the source maps. This helps you understand where code bloat is coming from.

Run below command to generate the report.

npm run analyze

Create production build

npm run build

This will create the production build of application in the build folder. It correctly bundles application in production mode and optimizes the build for the best performance.

Run the production build of frontend module

When you do npm start the app is started in development mode.

If you have built the app and you want to run the app in production mode (i.e.from build directory), Install serve and start the app using below commands

npm install serve -g
npm run build
serve -s build