From 4783de7a400ffc109137ffbf7dd8de610c4aa416 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Tue, 25 Jun 2024 08:57:21 -0700 Subject: [PATCH] Fixes js bundle failed (#45155) Summary: When I enabled `FORCE_BUNDLING`, it build errors like below. cc blakef ![image](https://github.com/facebook/react-native/assets/5061845/d23f6bad-ed60-4f1f-8111-2361c93e93a4) ## Changelog: [INTERNAL] [FIXED] - Fixes js bundle failed Pull Request resolved: https://github.com/facebook/react-native/pull/45155 Test Plan: Enable FORCE_BUNDLING and build success. Reviewed By: cipolleschi Differential Revision: D59006962 Pulled By: blakef fbshipit-source-id: 1142d1ddbae7346b67712fac0237950847211992 --- packages/react-native/scripts/bundle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/scripts/bundle.js b/packages/react-native/scripts/bundle.js index a6dd5ec4129..53acb055b2c 100644 --- a/packages/react-native/scripts/bundle.js +++ b/packages/react-native/scripts/bundle.js @@ -31,9 +31,9 @@ program 'npx react-native config', ) .option('--load-config ', 'JSON project config') - .action(async function handleAction(_, options) { + .action(async function handleAction() { let config = null; - + let options = program.opts(); if (options.loadConfig != null) { config = JSON.parse( options.loadConfig.replace(/^\W*'/, '').replace(/'\W*$/, ''),