From ee378e18a4f601e44a919777da99d441ed86e70b Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Thu, 4 Jul 2024 15:00:10 +0200 Subject: [PATCH] fix: support rewriting .js extensions --- packages/react-native-builder-bob/src/babel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-builder-bob/src/babel.ts b/packages/react-native-builder-bob/src/babel.ts index 478d24824..4a81e87d3 100644 --- a/packages/react-native-builder-bob/src/babel.ts +++ b/packages/react-native-builder-bob/src/babel.ts @@ -27,7 +27,7 @@ const isDirectory = (filename: string): boolean => { }; const isModule = (filename: string, ext: string): boolean => { - const exts = ['ts', 'tsx', ext]; + const exts = ['.js', '.ts', '.jsx', '.tsx', ext]; // Metro won't resolve these extensions if explicit extension is provided // So we can't add extension to these files