From 8620b9b1b31bf350376f6b69f0372990f8a5c9f0 Mon Sep 17 00:00:00 2001 From: Forbes Lindesay Date: Mon, 25 Jul 2016 11:36:39 +0100 Subject: [PATCH] Simplify path resolving for react-scripts --- bin/react-scripts.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/react-scripts.js b/bin/react-scripts.js index 3f924225ae3..355d49f16f0 100644 --- a/bin/react-scripts.js +++ b/bin/react-scripts.js @@ -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;