Skip to content

Commit 64b7194

Browse files
ApacheExgaearon
authored andcommitted
Fix read of .env variables (facebook#2242)
1 parent 87e4849 commit 64b7194

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/env.js

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
const fs = require('fs');
1414
const paths = require('./paths');
1515

16+
// Make sure that including paths.js after env.js will read .env variables.
17+
delete require.cache[require.resolve('./paths')];
18+
1619
const NODE_ENV = process.env.NODE_ENV;
1720
if (!NODE_ENV) {
1821
throw new Error(

0 commit comments

Comments
 (0)