Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tyhopp/react-node-env
Replace all instances of NODE_ENV with REACT_NODE_ENV in React
https://github.com/tyhopp/react-node-env
Last synced: about 5 hours ago
JSON representation
Replace all instances of NODE_ENV with REACT_NODE_ENV in React
- Host: GitHub
- URL: https://github.com/tyhopp/react-node-env
- Owner: tyhopp
- License: mit
- Created: 2022-09-13T05:51:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T07:36:53.000Z (over 1 year ago)
- Last Synced: 2023-03-24T03:34:07.657Z (over 1 year ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# react-node-env
Replace all instances of the `NODE_ENV` environment variable with `REACT_NODE_ENV` in these packages:
- `react`
- `react-dom`
- `react-is`
- `react-server-dom-webpack`
- `scheduler`> If there's another package that would be useful to add to this list please feel free to open a PR.
Useful if you want to enable React's development builds for debugging without changing `NODE_ENV` in your process (since other things may depend on it).
## Usage
To convert:
```
npx react-node-env@latest
```or revert:
```
npx react-node-env@latest --revert
```Then you can set the `REACT_NODE_ENV` as you wish, for example:
```
REACT_NODE_ENV='development' npm run build
```