Skip to content

Commit

Permalink
Support custom NODE_* env vars during build
Browse files Browse the repository at this point in the history
  • Loading branch information
mars committed Sep 3, 2016
1 parent 792c9ff commit e5c044a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e5c044a

Please sign in to comment.