From e5c044afd67b9b8dec433e5b7cb9667cad8a3ac4 Mon Sep 17 00:00:00 2001 From: Mars Hall Date: Sat, 3 Sep 2016 15:41:22 -0700 Subject: [PATCH] Support custom `NODE_*` env vars during build --- bin/compile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/compile b/bin/compile index 4aa4632..9d5f80e 100755 --- a/bin/compile +++ b/bin/compile @@ -39,9 +39,12 @@ else echo '{ "root": "build/" }' > static.json fi -# Support custom `REACT_APP_*` env vars during build. -# https://github.com/facebookincubator/create-react-app/blob/v0.2.3/template/README.md#adding-custom-environment-variables -export_env_dir "$ENV_DIR" '^REACT_APP_' +# Support env vars during build: +# * `REACT_APP_*` +# * https://github.com/facebookincubator/create-react-app/blob/v0.2.3/template/README.md#adding-custom-environment-variables +# * `NODE_*`, especially for `NODE_PATH` +# * https://github.com/facebookincubator/create-react-app/pull/476 +export_env_dir "$ENV_DIR" '^(REACT_APP_|NODE_)' # Build the javascript bundle npm run build