Deploy with auto build by mars · Pull Request #156 · mars/create-react-app-buildpack (original) (raw)
Resolves #155
Adapts this buildpack for the upcoming change to the official Node.js buildpack.
⛵️ No changes are required to apps deployed with the master version of this buildpack. The npx @heroku/update-node-build-script
changes should NOT be applied to apps deployed with master version of this buildpack.
Includes a few inherent changes to the architecture:
- the Node buildpack executes
npm run build
automatically - the Node buildpack installs
devDependencies
for auto build (and afterwards it prunes them), so a confusingNODE_ENV
workaround has been removed - the Node buildpack makes all config vars available during auto build, so compile-time configuration has access to all config vars.
Release Schedule
This feature will be merged & released on March 11, 2019, before the Node buildpack switches over, so that the transition to auto build is seamless.
Get Ready
If you want to test this, follow these instructions to switch to the new behavior ahead of its release. Otherwise, you do not need to do anything to continue using this buildpack before, on, or after March 11.
Set your app to use this buildpack branch:
heroku buildpacks:set https://github.com/mars/create-react-app-buildpack#deploy-with-auto-build
⚠️ If you already set "heroku-postbuild": "echo Skip build on Heroku"
to avoid the new auto build behavior, then make sure to remove that property from package.json
so that auto build can run.
Finally, remember to switch the app back to the master buildpack release so that your app automatically receive buildpack updates:
heroku buildpacks:set mars/create-react-app
Test It & Holler
Use the Get Ready instructions above to try it ahead of time and let me know if you find any problems!
Especially thank you @jmorrell for continuing to evolve the Node.js buildpack 🥓💯✅💜 and messaging so clearly about this upcoming change!