Skip to content

Commit 9dc23a3

Browse files
ForbesLindesaygaearon
authored andcommitted
Simplify path resolving for react-scripts (#168)
1 parent 06df2ec commit 9dc23a3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bin/react-scripts.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env node
2-
var path = require('path');
32
var spawn = require('cross-spawn');
43
var script = process.argv[2];
54
var args = process.argv.slice(3);
@@ -10,7 +9,7 @@ case 'start':
109
case 'eject':
1110
spawn(
1211
'node',
13-
[path.resolve(__dirname, '..', 'scripts', script)].concat(args),
12+
[require.resolve('../scripts/' + script)].concat(args),
1413
{stdio: 'inherit'}
1514
);
1615
break;

0 commit comments

Comments
 (0)