From c139df5ae26e0291e5d378d4967b0fbe293288ae Mon Sep 17 00:00:00 2001 From: Sami Jaber Date: Fri, 1 Sep 2023 10:18:50 -0300 Subject: [PATCH] feat: support bob.config.cjs for configuration (#442) ### Summary I have a library configured with `"type": "module"`. This means that I need to provide `bob.config.cjs`, as `.js` extensions won't do. That config file needs to be explicitly added to the cosmicConfig --- packages/react-native-builder-bob/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-builder-bob/src/index.ts b/packages/react-native-builder-bob/src/index.ts index c61a9ce19..7a1ba2c06 100644 --- a/packages/react-native-builder-bob/src/index.ts +++ b/packages/react-native-builder-bob/src/index.ts @@ -18,7 +18,7 @@ const { name, version } = require('../package.json'); const root = process.cwd(); const explorer = cosmiconfigSync(name, { - searchPlaces: ['package.json', `bob.config.js`], + searchPlaces: ['package.json', `bob.config.js`, 'bob.config.cjs'], }); const FLOW_PRGAMA_REGEX = /\*?\s*@(flow)\b/m;