(config: Config)
| 10 | * @internal |
| 11 | */ |
| 12 | export function applyDotEnvPlugin(config: Config) { |
| 13 | const path = getDotEnvPath(); |
| 14 | |
| 15 | config.when(path !== null, (config) => { |
| 16 | config.plugin('DotEnvPlugin').use(DotEnvPlugin, [ |
| 17 | { |
| 18 | path, |
| 19 | silent: true, // hide any errors |
| 20 | }, |
| 21 | ]); |
| 22 | }); |
| 23 | } |
| 24 | |
| 25 | function getDotEnvFileName(): string { |
| 26 | if (env.env) { |