So in heroku I have observed that they have a option to build the development code to production code by using npm run heroku-postbuild and then executes npm start so that whenever user opens the webpage the server wont build the code one again and start the server instead it will directly start the server.
So if there was something like whenever there are changes in files the app should execute:
npm run build && npm start
And when user hits website it should only execute :
npm start (and not npm run build)
Because when you use react scripts or webpack it takes time to build the code and then start the server so it is better to have it like that i mentioned.
I think you could give the option of executing what by using watch.json