From 86c5c67656712a990f2dd1c9eda761c7082d52e6 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Fri, 6 Dec 2024 19:00:13 +0100 Subject: [PATCH] fix: fix codegen script failing due to missing platforms there is a regression in the codegen script that assumes `platforms` field to be present. so we add empty objects to avoid the crash during code generation. --- .../native-common-example/example/react-native.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/create-react-native-library/templates/native-common-example/example/react-native.config.js b/packages/create-react-native-library/templates/native-common-example/example/react-native.config.js index 7fc6807bf..ae95bd0a4 100644 --- a/packages/create-react-native-library/templates/native-common-example/example/react-native.config.js +++ b/packages/create-react-native-library/templates/native-common-example/example/react-native.config.js @@ -25,6 +25,12 @@ module.exports = { dependencies: { [pkg.name]: { root: path.join(__dirname, '..'), + platforms: { + // Codegen script incorrectly fails without this + // So we explicitly specify the platforms with empty object + ios: {}, + android: {}, + }, }, }, };