Skip to content

Commit

Permalink
Removed NODE_PATH from env.js
Browse files Browse the repository at this point in the history
env.js is only for variables injected into the app.
  • Loading branch information
Jimmy Miller authored and gaearon committed Sep 2, 2016
1 parent afe25df commit 6e94bd8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
});
2 changes: 1 addition & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 6e94bd8

Please sign in to comment.