Have you looked here? https://reactjs.org/docs/optimizing-performance.html
It gives you an idea. If you used create react app for the front end then just run build. Other than that, look here : https://medium.com/netscape/webpack-3-react-production-build-tips-d20507dba99a
Personally, I either build my own webpack.config (not hard at all...just looks difficult) or use create-react-app to scaffold the front end.