B
B
budda6742022-02-21 19:55:05
React
budda674, 2022-02-21 19:55:05

How to build a separate part of the CRA application?

There are two types of pages in the project - private and public. I need to set up a beat so that on one command I build an assembly with only private pages and on the other with public ones. I have no idea how to set it up.
P.S. At the moment, it builds everything as usual.

"scripts": {
    "start": "env-cmd -f .env.dev react-scripts start",
    "start--local": "env-cmd -f .env.localhost react-scripts start",
    "start--staging": "env-cmd -f .env.staging react-scripts start",
    "build--dev": "env-cmd -f .env.dev react-scripts build",
    "build--qa": "env-cmd -f .env.staging react-scripts build",
    "build--prod": "env-cmd -f .env.production react-scripts build",
    "build--prod-public": "env-cmd -f .env.production react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question