Skip to content

Commit 54322bc

Browse files
committed
cjs for this
1 parent 253308b commit 54322bc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugins/with-fcm-manifest-fixes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AndroidConfig, withAndroidManifest } from "@expo/config-plugins";
1+
const { withAndroidManifest, AndroidConfig } = require('@expo/config-plugins');
22

33
const withFcmManifestFixes = (config) => {
44
return withAndroidManifest(config, (cfg) => {
@@ -11,7 +11,8 @@ const withFcmManifestFixes = (config) => {
1111
}
1212

1313
// Get <application>
14-
const app = AndroidConfig.Manifest.getMainApplicationOrThrow(manifest);
14+
const app = AndroidConfig.Manifest.getMainApplication(manifest);
15+
if (!app) { throw new Error('Main application not found in AndroidManifest'); }
1516

1617
// Helper to upsert <meta-data> by android:name
1718
const upsertMetaData = (name, attrs) => {
@@ -39,4 +40,4 @@ const withFcmManifestFixes = (config) => {
3940
});
4041
};
4142

42-
export default withFcmManifestFixes;
43+
module.exports = withFcmManifestFixes;

0 commit comments

Comments
 (0)