Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
6e94bd84
Commit
6e94bd84
authored
8 years ago
by
Jimmy Miller
Committed by
Dan Abramov
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Removed NODE_PATH from env.js
env.js is only for variables injected into the app.
parent
afe25dfe
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/env.js
+1
-3
config/env.js
config/webpack.config.dev.js
+1
-1
config/webpack.config.dev.js
config/webpack.config.prod.js
+1
-1
config/webpack.config.prod.js
with
3 additions
and
5 deletions
+3
-5
config/env.js
+
1
-
3
View file @
6e94bd84
...
...
@@ -14,7 +14,6 @@
var
REACT_APP
=
/^REACT_APP_/i
;
var
NODE_ENV
=
JSON
.
stringify
(
process
.
env
.
NODE_ENV
||
'
development
'
);
var
NODE_PATH
=
process
.
env
.
NODE_PATH
||
''
;
module
.
exports
=
Object
.
keys
(
process
.
env
)
...
...
@@ -23,6 +22,5 @@ module.exports = Object
env
[
'
process.env.
'
+
key
]
=
JSON
.
stringify
(
process
.
env
[
key
]);
return
env
;
},
{
'
process.env.NODE_ENV
'
:
NODE_ENV
,
'
process.env.NODE_PATH
'
:
NODE_PATH
'
process.env.NODE_ENV
'
:
NODE_ENV
});
This diff is collapsed.
Click to expand it.
config/webpack.config.dev.js
+
1
-
1
View file @
6e94bd84
...
...
@@ -69,7 +69,7 @@ module.exports = {
resolve
:
{
// This allows you to set a root for where webpack should look for modules.
// This enables you to use absolute imports from the root.
root
:
path
.
resolve
(
env
[
'
process.env.NODE_PATH
'
]
),
root
:
path
.
resolve
(
process
.
env
.
NODE_PATH
||
'
'
),
// These are the reasonable defaults supported by the Node ecosystem.
extensions
:
[
'
.js
'
,
'
.json
'
,
''
],
alias
:
{
...
...
This diff is collapsed.
Click to expand it.
config/webpack.config.prod.js
+
1
-
1
View file @
6e94bd84
...
...
@@ -64,7 +64,7 @@ module.exports = {
resolve
:
{
// This allows you to set a root for where webpack should look for modules.
// This enables you to use absolute imports from the root.
root
:
path
.
resolve
(
env
[
'
process.env.NODE_PATH
'
]
),
root
:
path
.
resolve
(
process
.
env
.
NODE_PATH
||
'
'
),
// These are the reasonable defaults supported by the Node ecosystem.
extensions
:
[
'
.js
'
,
'
.json
'
,
''
],
alias
:
{
...
...
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
Menu
Explore
Projects
Groups
Snippets