You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2022. It is now read-only.
Supports all config vars, including [`REACT_APP_`](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-custom-environment-variables), `NODE_`, `NPM_`, & `HEROKU_` prefixed variables.
360
+
361
+
☝️🤐 ***Use secrets carefully.** If these values are embedded in the JavaScript bundle, like with `REACT_APP_` vars, then they may be accessed by anyone who can see the React app.*
360
362
361
363
Use Node's [`process.env` object](https://nodejs.org/dist/latest-v10.x/docs/api/process.html#process_process_env).
362
364
@@ -526,15 +528,15 @@ This buildpack combines several buildpacks, specified in [`.buildpacks`](.buildp
526
528
* installs `node`, puts on the `$PATH`
527
529
* version specified in [`package.json`, `engines.node`](https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version)
528
530
*`node_modules/` cached between deployments
531
+
* production build for create-react-app
532
+
* [executes the npm package's build script](https://devcenter.heroku.com/changelog-items/1557); create-react-app default is `react-scripts build`
533
+
* exposes all env vars to the build script
534
+
* generates a production bundle regardless of `NODE_ENV` setting
529
535
* `NODE_ENV` at buildtime:
530
536
* defaults to `NODE_ENV=development` to install the build tooling of create-react-app's dev dependencies, like `react-scripts`
531
537
* honors specific setting of `NODE_ENV`, like `NODE_ENV=test`for[automated testing](#user-content-testing)in [`bin/test`](bin/test-compile)
532
538
* but forces `NODE_ENV=production` to be `development` to ensure dev dependencies are available for build
0 commit comments