Skip to content

Commit

Permalink
Programatically pass env vars as a whitelist (#1470)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesstelford authored and devongovett committed Jun 14, 2018
1 parent 86731cc commit a662f90
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Bundler.js
Expand Up @@ -318,11 +318,14 @@ class Bundler extends EventEmitter {
}

await this.loadPlugins();
await loadEnv(Path.join(this.options.rootDir, 'index'));

if (!this.options.env) {
await loadEnv(Path.join(this.options.rootDir, 'index'));
this.options.env = process.env;
}

this.options.extensions = Object.assign({}, this.parser.extensions);
this.options.bundleLoaders = this.bundleLoaders;
this.options.env = process.env;

if (this.options.watch) {
this.watcher = new Watcher();
Expand Down

0 comments on commit a662f90

Please sign in to comment.