mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-28 09:25:42 +08:00
Simplify path resolving for react-scripts (#168)
This commit is contained in:
committed by
Dan Abramov
parent
06df2ecb46
commit
9dc23a3484
3
bin/react-scripts.js
vendored
3
bin/react-scripts.js
vendored
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
var path = require('path');
|
||||
var spawn = require('cross-spawn');
|
||||
var script = process.argv[2];
|
||||
var args = process.argv.slice(3);
|
||||
@@ -10,7 +9,7 @@ case 'start':
|
||||
case 'eject':
|
||||
spawn(
|
||||
'node',
|
||||
[path.resolve(__dirname, '..', 'scripts', script)].concat(args),
|
||||
[require.resolve('../scripts/' + script)].concat(args),
|
||||
{stdio: 'inherit'}
|
||||
);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user