Deploy React ke heroku

bikin file Procfile pada root floder lalu tulis web: serve -s build instal serve yarn global add serve atau bisa tambahkan package serve di package.json pas bagian dependencies "serve" : "^11.1.0" modifikasi file package.json "scripts" : { "dev" : "react-scripts start" , "start" : "serve -s build" , "build" : "react-scripts build" , "test" : "react-scripts test" , "eject" : "react-scripts eject" , "heroku-postbuild" : "npm run build" }, ketika push ker heroku pastikan file pastikan yarn.lock dana package-lock.json jangan ke push tambahan env variabel pada heroku web NODE_ENV production lalu tinggal bikin web heroku terbaru lalu deploy contoh : https://protected-castle-33295.herokuapp.com/