@@ -86,7 +86,6 @@ module.exports = {
86
86
yarnLockFile : resolveApp ( 'yarn.lock' ) ,
87
87
testsSetup : resolveApp ( 'client/setupTests.js' ) ,
88
88
appNodeModules : resolveApp ( 'node_modules' ) ,
89
- ownNodeModules : resolveApp ( 'node_modules' ) ,
90
89
nodePaths : nodePaths ,
91
90
publicUrl : getPublicUrl ( resolveApp ( 'package.json' ) ) ,
92
91
servedPath : getServedPath ( resolveApp ( 'package.json' ) )
@@ -100,7 +99,6 @@ function resolveOwn(relativePath) {
100
99
// config before eject: we're in ./node_modules/react-scripts/config/
101
100
module . exports = {
102
101
appPath : resolveApp ( '.' ) ,
103
- ownPath : resolveApp ( 'node_modules/react-scripts' ) ,
104
102
appBuild : resolveApp ( buildPath ) ,
105
103
appPublic : resolveApp ( 'client/public' ) ,
106
104
appHtml : resolveApp ( 'client/public/index.html' ) ,
@@ -110,11 +108,12 @@ module.exports = {
110
108
yarnLockFile : resolveApp ( 'yarn.lock' ) ,
111
109
testsSetup : resolveApp ( 'client/setupTests.js' ) ,
112
110
appNodeModules : resolveApp ( 'node_modules' ) ,
113
- // this is empty with npm3 but node resolution searches higher anyway:
114
- ownNodeModules : resolveOwn ( 'node_modules' ) ,
115
111
nodePaths : nodePaths ,
116
112
publicUrl : getPublicUrl ( resolveApp ( 'package.json' ) ) ,
117
- servedPath : getServedPath ( resolveApp ( 'package.json' ) )
113
+ servedPath : getServedPath ( resolveApp ( 'package.json' ) ) ,
114
+ // These properties only exist before ejecting:
115
+ ownPath : resolveOwn ( '.' ) ,
116
+ ownNodeModules : resolveOwn ( 'node_modules' ) , // This is empty on npm 3
118
117
} ;
119
118
120
119
var reactScriptsPath = path . resolve ( 'node_modules/react-scripts' ) ;
@@ -124,7 +123,6 @@ var reactScriptsLinked = fs.existsSync(reactScriptsPath) && fs.lstatSync(reactSc
124
123
if ( ! reactScriptsLinked && __dirname . indexOf ( path . join ( 'packages' , 'react-scripts' , 'config' ) ) !== - 1 ) {
125
124
module . exports = {
126
125
appPath : resolveApp ( '.' ) ,
127
- ownPath : resolveOwn ( '.' ) ,
128
126
appBuild : resolveOwn ( '../../' + buildPath ) ,
129
127
appPublic : resolveOwn ( 'template/client/public' ) ,
130
128
appHtml : resolveOwn ( 'template/client/public/index.html' ) ,
@@ -134,10 +132,12 @@ if (!reactScriptsLinked && __dirname.indexOf(path.join('packages', 'react-script
134
132
yarnLockFile : resolveOwn ( 'template/yarn.lock' ) ,
135
133
testsSetup : resolveOwn ( 'template/client/setupTests.js' ) ,
136
134
appNodeModules : resolveOwn ( 'node_modules' ) ,
137
- ownNodeModules : resolveOwn ( 'node_modules' ) ,
138
135
nodePaths : nodePaths ,
139
136
publicUrl : getPublicUrl ( resolveOwn ( 'package.json' ) ) ,
140
- servedPath : getServedPath ( resolveOwn ( 'package.json' ) )
137
+ servedPath : getServedPath ( resolveOwn ( 'package.json' ) ) ,
138
+ // These properties only exist before ejecting:
139
+ ownPath : resolveOwn ( '.' ) ,
140
+ ownNodeModules : resolveOwn ( 'node_modules' ) ,
141
141
} ;
142
142
}
143
143
// @remove -on-eject-end
0 commit comments