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

https://github.com/codaline-io/parcel-optimizer-replace-envs

parcel v2 optimizer to replace process.env in files
https://github.com/codaline-io/parcel-optimizer-replace-envs

Last synced: over 1 year ago
JSON representation

parcel v2 optimizer to replace process.env in files

Awesome Lists containing this project

README

          

### Parcel v2 Optimizer to replace `process.env`s

- reads `.env` file when ` NODE_ENV` !== `production`, default `process.cwd() + '.env'` (full path can be overwritten by setting `DOTENV_FILE` - how ironic :D)
- replaces occurences of `process.env.X` with the value

### How it works

- somehow hacky, because as an optimizer it just uses a dumb regex to replace all `process.env` with its values