Skip to content

Support custom NODE_* env vars during build #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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