Commit a5312e2 1 parent 6182bb1 commit a5312e2 Copy full SHA for a5312e2
File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 10
10
// @remove -on-eject-end
11
11
12
12
var path = require ( 'path' ) ;
13
+ var fs = require ( 'fs' ) ;
14
+
15
+ // Make sure any symlinks in the project folder are resolved:
16
+ // https://github.com/facebookincubator/create-react-app/issues/637
17
+ var appDirectory = fs . realpathSync ( process . cwd ( ) ) ;
18
+ function resolveApp ( relativePath ) {
19
+ return path . resolve ( appDirectory , relativePath ) ;
20
+ }
13
21
14
22
// We support resolving modules according to `NODE_PATH`.
15
23
// This lets you use absolute paths in imports inside large monorepos:
@@ -25,11 +33,7 @@ var path = require('path');
25
33
var nodePaths = ( process . env . NODE_PATH || '' )
26
34
. split ( process . platform === 'win32' ? ';' : ':' )
27
35
. filter ( Boolean )
28
- . map ( p => path . resolve ( p ) ) ;
29
-
30
- function resolveApp ( relativePath ) {
31
- return path . resolve ( relativePath ) ;
32
- }
36
+ . map ( resolveApp ) ;
33
37
34
38
// config after eject: we're in ./config/
35
39
module . exports = {
You can’t perform that action at this time.
0 commit comments