Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Commit 1f5369b

Browse files
committed
Node env vars
1 parent 45797dc commit 1f5369b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.buildpacks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
https://github.com/heroku/heroku-buildpack-nodejs.git
2-
https://github.com/mars/create-react-app-inner-buildpack.git#v1.2.0
2+
https://github.com/mars/create-react-app-inner-buildpack.git#v1.3.0
33
https://github.com/heroku/heroku-buildpack-static.git

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ Create a `static.json` file to configure the web server for clean [`browserHisto
108108

109109
### Environment variables
110110

111-
`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.
111+
[`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.
112112

113113
Set [config vars on a Heroku app](https://devcenter.heroku.com/articles/config-vars) like this:
114114

115115
```bash
116116
heroku config:set REACT_APP_HELLO='I love sushi!'
117117
```
118118

119-
♻️ 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.
119+
♻️ 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.
120120

121121
```bash
122122
git commit --allow-empty -m "Set REACT_APP_HELLO config var"

0 commit comments

Comments
 (0)