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

Commit c61d5fd

Browse files
committed
Use Node buildpack‘s auto build
1 parent 2bbc821 commit c61d5fd

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
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#v8.0.0
2+
https://github.com/mars/create-react-app-inner-buildpack.git#deploy-with-auto-build
33
https://github.com/heroku/heroku-buildpack-static.git

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ ex: `REACT_APP_FILEPICKER_API_KEY` ([Add-on config vars](#user-content-add-on-co
356356

357357
### Compile-time configuration
358358

359-
Supports [`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.
359+
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.*
360362

361363
Use Node's [`process.env` object](https://nodejs.org/dist/latest-v10.x/docs/api/process.html#process_process_env).
362364

@@ -526,15 +528,15 @@ This buildpack combines several buildpacks, specified in [`.buildpacks`](.buildp
526528
* installs `node`, puts on the `$PATH`
527529
* version specified in [`package.json`, `engines.node`](https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version)
528530
* `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
529535
* `NODE_ENV` at buildtime:
530536
* defaults to `NODE_ENV=development` to install the build tooling of create-react-app's dev dependencies, like `react-scripts`
531537
* honors specific setting of `NODE_ENV`, like `NODE_ENV=test` for [automated testing](#user-content-testing) in [`bin/test`](bin/test-compile)
532538
* but forces `NODE_ENV=production` to be `development` to ensure dev dependencies are available for build
533539
2. [`mars/create-react-app-inner-buildpack`](https://github.com/mars/create-react-app-inner-buildpack)
534-
* production build for create-react-app
535-
* executes the npm package's build script; create-react-app default is `react-scripts build`
536-
* exposes `REACT_APP_`, `NODE_`, `NPM_`, & `HEROKU_` prefixed env vars to the build script
537-
* generates a production bundle regardless of `NODE_ENV` setting
538540
* sets default [web server config](#user-content-web-server) unless `static.json` already exists
539541
* enables [runtime environment variables](#user-content-environment-variables)
540542
3. [`heroku/static` buildpack](https://github.com/heroku/heroku-buildpack-static)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy