From 5ded51e2e15c335a509c6d819834b3fe7419565a Mon Sep 17 00:00:00 2001 From: Mars Hall Date: Mon, 26 Mar 2018 13:14:18 -0700 Subject: [PATCH] Support for npm Private Modules (#96) --- .buildpacks | 2 +- README.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.buildpacks b/.buildpacks index b2b0e4e7..d525ec57 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#v3.0.0 +https://github.com/mars/create-react-app-inner-buildpack.git#v4.0.0 https://github.com/heroku/heroku-buildpack-static.git diff --git a/README.md b/README.md index f63e28e9..e1ee6e58 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Deploy React.js web apps generated with [create-react-app](https://github.com/fa * [Compile-time config](#user-content-compile-time-configuration) * [Runtime config](#user-content-runtime-configuration) * [using an Add-on's config](#user-content-add-on-config-vars) + * [npm Private Packages](#user-content-npm-private-packages) * 🕵️ [Troubleshooting](#user-content-troubleshooting) * 📍 [Version compatibility](#user-content-version-compatibility) * 🏙 [Architecture](#user-content-architecture-) @@ -393,6 +394,17 @@ For example, to use the API key for the [Filestack](https://elements.heroku.com/ export REACT_APP_FILEPICKER_API_KEY=${FILEPICKER_API_KEY:-} ``` +npm Private Packages +------------------- +Private modules are supported during build. + +1. Setup your app with a `.npmrc` file following [npm's guide for CI/deployment](https://docs.npmjs.com/private-modules/ci-server-config). +1. Set your secret in the `NPM_TOKEN` config var: + + ```bash + heroku config:set NPM_TOKEN=xxxxx + ``` + Troubleshooting ---------------