What is the best way to trigger Webpack build after deploying to Heroku?
Push already bundled version in not the most beautiful solution.
To deploy React app on Heroku, we need to add buildpacks. Click on the Settings tab and then click on Add buildpack button inside the Buildpacks section. Our React buildpack URL is https://github.com/mars/create-react-app-buildpack. Copy this URL and add it to buildpack like below.
Heroku Node. js support will only be applied when the application has a package. json file in the root directory.
What kind of application is this? If you are using a package.json, you could run webpack in the postinstall step using npm scripts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With