From c6540223001fdb3926c724c4cb8243eb6a0e69a7 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Fri, 6 Sep 2019 11:00:17 +0800 Subject: [PATCH] Revert bundle command --- local-cli/src/bundle.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/local-cli/src/bundle.js b/local-cli/src/bundle.js index 21c3d23..77d7b43 100644 --- a/local-cli/src/bundle.js +++ b/local-cli/src/bundle.js @@ -56,7 +56,8 @@ async function runReactNativeBundleCommand( fs.emptyDirSync(outputFolder); Array.prototype.push.apply(reactNativeBundleArgs, [ - 'bundle', + path.join("node_modules", "react-native", "local-cli", "cli.js"), + "bundle", '--assets-dest', outputFolder, '--bundle-output', @@ -77,8 +78,8 @@ async function runReactNativeBundleCommand( reactNativeBundleArgs.push('--config', config); } - const reactNativeBundleProcess = spawn('react-native', reactNativeBundleArgs); - console.log(`Running bundle command: react-native ${reactNativeBundleArgs.join(' ')}`); + const reactNativeBundleProcess = spawn('node', reactNativeBundleArgs); + console.log(`Running bundle command: node ${reactNativeBundleArgs.join(' ')}`); return new Promise((resolve, reject) => { reactNativeBundleProcess.stdout.on('data', data => {