Commit 4a321713 authored by Oleg Kuzava's avatar Oleg Kuzava Committed by Dan Abramov
Browse files

Fix read of .env variables (#2242)

parent 70a7f28e
Showing with 3 additions and 0 deletions
+3 -0
......@@ -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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment