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
- Host: GitHub
- URL: https://github.com/codaline-io/parcel-optimizer-replace-envs
- Owner: codaline-io
- License: mit
- Created: 2021-05-22T15:17:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T05:57:55.000Z (almost 3 years ago)
- Last Synced: 2025-03-10T16:07:08.127Z (over 1 year ago)
- Language: JavaScript
- Size: 659 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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