1- import dotenv from 'dotenv' ;
2- import withNotificationToolsReplace from './plugins/test.cjs' ;
3- import versionData from './version.json' ;
4- import { withPlugins } from '@expo/config-plugins' ;
5- import { withXcodeProject } from 'expo/config-plugins' ;
6- import fs from 'fs' ;
1+ // Converted to CommonJS-only so build scripts can safely require this file
2+ // (previous ESM import of JSON caused: needs an import attribute of "type: json")
3+ const dotenv = require ( 'dotenv' ) ;
4+ const withNotificationToolsReplace = require ( './plugins/test.cjs' ) ;
5+ // Use require for JSON to avoid ESM assertion issues in Node scripts
6+ // eslint-disable-next-line @typescript-eslint/no-var-requires
7+ const versionData = require ( './version.json' ) ;
8+ // eslint-disable-next-line @typescript-eslint/no-var-requires
9+ const { withXcodeProject } = require ( 'expo/config-plugins' ) ;
10+ const fs = require ( 'fs' ) ;
711
812// Explicitly load the .env file
913dotenv . config ( ) ;
1014
11- console . log ( 'process.env.GOOGLE_SERVICES_JSON:' , process . env . GOOGLE_SERVICES_JSON ) ;
12-
1315// Add this new plugin
1416const withIOSSounds = ( config ) => {
1517 return withXcodeProject ( config , async ( cfg ) => {
@@ -87,7 +89,7 @@ module.exports = {
8789 } ,
8890 package : 'com.digitalnomad91.codebuilderadmin' ,
8991 permissions : [ 'NOTIFICATIONS' , 'POST_NOTIFICATIONS' , 'READ_PHONE_STATE' ] ,
90- googleServicesFile : process . env . GOOGLE_SERVICES_JSON ?? './google-services.json' ,
92+ googleServicesFile : './google-services.json' ,
9193 useNextNotificationsApi : true ,
9294 notification : {
9395 icon : './assets/images/icon.png' ,
@@ -98,17 +100,17 @@ module.exports = {
98100 apiKey : process . env . GOOGLE_MAPS_API_KEY ,
99101 } ,
100102 } ,
101- // manifest: {
102- // application: {
103- // metaData: [
104- // {
105- // "android:name": "com.google.firebase.messaging.default_notification_color",
106- // "android:resource": "@color/notification_icon_color",
107- // "tools:replace": "android:resource",
108- // },
109- // ],
110- // },
111- // },
103+ manifest : {
104+ application : {
105+ metaData : [
106+ {
107+ "android:name" : "com.google.firebase.messaging.default_notification_color" ,
108+ "android:resource" : "@color/notification_icon_color" ,
109+ "tools:replace" : "android:resource" ,
110+ } ,
111+ ] ,
112+ } ,
113+ } ,
112114 } ,
113115 web : {
114116 bundler : 'metro' ,
0 commit comments