UNPKG

env-create-react-app

Version:

create-react-app import environment variables helper without REACT_APP prefix helper.

10 lines (9 loc) 300 B
"use strict"; function get_envs() { var environment_variables = {}; Array.prototype.forEach.call(Object.keys(process.env), function(key){ environment_variables[key.replace("REACT_APP_", "")] = process.env[key]; }); return environment_variables; } module.exports = get_envs();