Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```