Skip to content

Commit

Permalink
Fix read of .env variables (facebook#2242)
Browse files Browse the repository at this point in the history
  • Loading branch information
ApacheEx authored and gaearon committed May 19, 2017
1 parent 87e4849 commit 64b7194
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
const fs = require('fs');
const paths = require('./paths');

// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve('./paths')];

const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
throw new Error(
Expand Down

0 comments on commit 64b7194

Please sign in to comment.