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