Change environment vars after build
Sometimes in project, with so specific architecture on build the env vars aren't change.
Just bash :)
- Npm
npm i -g changenv
- Yarn
yarn add changenv
changenv <environment> <path_to_folder>
Changenv will looking for .env.<environment>
file, read it, and for each var, change every match with process.env.<env_var_name>
on <path_to_folder>
with their value.
changenv production ./build
changenv staging ./lib
changenv development ./dist