Is it fine to create new builds to your production in react?

42 views Asked by At

I am working on a react webapp which has its dev server on my local computer and I push its commits (from git) to my gcp instance. Each time after all the upgrades, I do a npm build and then put that build to my production. Just wanted to know if is it the right way? Does creating multiple builds affect anything including code or website performance? I mean creating build bundles everyday? Is that fine or should I follow some other approach?

1

There are 1 answers

2
Danilson Reis On BEST ANSWER

Run a build optimizes performance, can save a few miliseconds of load time to the end user and it minimizes the number and size of files the user gets, but it is worthy to run a build only when your going to deploy your app to production.

In my opinion on development the build it's not that necessary so I recommend to only push the commits. If you're interest in testing the perfomance of your app you can read this react article that discusses testing performance on development builds using perf.

Best Regards.