From 1f5369bf4d0c11bed331f9986d573ec52c3d9c0d Mon Sep 17 00:00:00 2001 From: Mars Hall Date: Sat, 3 Sep 2016 15:57:44 -0700 Subject: [PATCH] Node env vars --- .buildpacks | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildpacks b/.buildpacks index 7d23210d..103d8375 100644 --- a/.buildpacks +++ b/.buildpacks @@ -1,3 +1,3 @@ https://github.com/heroku/heroku-buildpack-nodejs.git -https://github.com/mars/create-react-app-inner-buildpack.git#v1.2.0 +https://github.com/mars/create-react-app-inner-buildpack.git#v1.3.0 https://github.com/heroku/heroku-buildpack-static.git diff --git a/README.md b/README.md index c59dfcfa..cdbf3cba 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Create a `static.json` file to configure the web server for clean [`browserHisto ### Environment variables -`REACT_APP_*` [custom environment variables](https://github.com/facebookincubator/create-react-app/blob/v0.2.3/template/README.md#adding-custom-environment-variables) are supported on Heroku. +[`REACT_APP_*`](https://github.com/facebookincubator/create-react-app/blob/v0.2.3/template/README.md#adding-custom-environment-variables) and [`NODE_*`](https://github.com/facebookincubator/create-react-app/pull/476) environment variables are supported on Heroku during the compile phase, when `npm run build` is executed to generate the JavaScript bundle. Set [config vars on a Heroku app](https://devcenter.heroku.com/articles/config-vars) like this: @@ -116,7 +116,7 @@ Set [config vars on a Heroku app](https://devcenter.heroku.com/articles/config-v heroku config:set REACT_APP_HELLO='I love sushi!' ``` -♻️ The app must be re-deployed for this change to take effect, because the normal app restart does not rebuild the React app with the new values. +♻️ The app must be re-deployed for this change to take effect, because the automatic restart after a config var change does not rebuild the JavaScript bundle. ```bash git commit --allow-empty -m "Set REACT_APP_HELLO config var"