Skip to content

Commit e5c044a

Browse files
committed
Support custom NODE_* env vars during build
1 parent 792c9ff commit e5c044a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bin/compile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ else
3939
echo '{ "root": "build/" }' > static.json
4040
fi
4141

42-
# Support custom `REACT_APP_*` env vars during build.
43-
# https://github.com/facebookincubator/create-react-app/blob/v0.2.3/template/README.md#adding-custom-environment-variables
44-
export_env_dir "$ENV_DIR" '^REACT_APP_'
42+
# Support env vars during build:
43+
# * `REACT_APP_*`
44+
# * https://github.com/facebookincubator/create-react-app/blob/v0.2.3/template/README.md#adding-custom-environment-variables
45+
# * `NODE_*`, especially for `NODE_PATH`
46+
# * https://github.com/facebookincubator/create-react-app/pull/476
47+
export_env_dir "$ENV_DIR" '^(REACT_APP_|NODE_)'
4548

4649
# Build the javascript bundle
4750
npm run build

0 commit comments

Comments
 (0)