Noncollinear Perpendicular Microcrystalline
Get unlimited public & private packages + team-based management with npm Teams.Learn more »

react-runtime

1.1.0 • Public • Published

react-runtime

Include REACT_APP_ environment variables at runtime in your react app.

Get started

yarn add --dev react-runtime

# Generate HTML for including in index.html
./node_modules/.bin/react-runtime html

# Add the following directly before launching your react app's server
react-runtime generate > build/react-runtime.env.js

# Replace all references to process.env in your js source with:
(e=process.env,e.NODE_ENV === 'production' ? window.reactRuntimeEnv : e)

Install

npm i react-runtime

DownloadsWeekly Downloads

52

Version

1.1.0

License

ISC

Unpacked Size

2.93 kB

Total Files

9

Last publish

Collaborators

  • avatar