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

Fix read of .env variables (#2242)

parent 70a7f28e
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 3 additions and 0 deletions
+3 -0
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
const fs = require('fs'); const fs = require('fs');
const paths = require('./paths'); 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; const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) { if (!NODE_ENV) {
throw new Error( 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