(envConfig: EnvConfig)
| 36 | * @returns Object with process.env.* definitions for webpack |
| 37 | */ |
| 38 | export function getWebpackEnvDefinitions(envConfig: EnvConfig): Record<string, string> { |
| 39 | const definitions: Record<string, string> = {}; |
| 40 | |
| 41 | Object.keys(envConfig).forEach((key) => { |
| 42 | if (envConfig[key] !== undefined) { |
| 43 | definitions[`process.env.${key}`] = JSON.stringify(envConfig[key]); |
| 44 | } |
| 45 | }); |
| 46 | |
| 47 | return definitions; |
| 48 | } |
no outgoing calls
no test coverage detected