Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
4a321713
Commit
4a321713
authored
7 years ago
by
Oleg Kuzava
Committed by
Dan Abramov
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix read of .env variables (#2242)
parent
70a7f28e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-scripts/config/env.js
+3
-0
packages/react-scripts/config/env.js
with
3 additions
and
0 deletions
+3
-0
packages/react-scripts/config/env.js
+
3
-
0
View file @
4a321713
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment