E
E
egorlisss2019-08-22 06:17:25
JavaScript
egorlisss, 2019-08-22 06:17:25

How to properly build a React project on Heroku?

Made a project on React, reached the deployment on Heroku.
I can not figure out the correct setting of packege.json, namely "scripts".
Now it looks like this:

"scripts": {
    "start": "serve -s build",
    "build": "set HTTPS=true&&react-scripts build",
    "test": "set HTTPS=true&&react-scripts test --env=jsdom",
    "eject": "set HTTPS=true&&react-scripts eject"
  },

As a result, we get a bunch of unnecessary files, libraries and all project files in open form:
S5kadQSLT1w.jpg
How to properly configure scripts to remove all unnecessary files and hide project files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2019-08-22
@egorlisss

put the .env file with one line in the react folder, it should help, it helped me
https://stackoverflow.com/a/54609789

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question