How to load custom process environment .ENV variables in webpack with craco (Create React App Configuration Override)
When you're using craco, and you need to specify different .env files with different .env variables, you'll need to override some webpack configs.
We'll be using 4 .env files:
.env.local
.env.development
.env.staging
.env.production
We'll then open ...
José Pablo Ramírez Vargas
Senior Software Developer @ Intel
I have a counter proposal. Let's see if you like it. What if I told you I made a configuration package that is not a hack (like
dotenvhere) and works natively with React or NodeJS?I am talking about wj-config, a configuration package able to create a hierarchical configuration object. It is inspired by the amazing .Net Configuration, so you can have multiple configuration sources and perform per-environment overrides.
On top of that, you can trace configuration values and have automatically created URL functions that does all URL management for you.