RTSDA-Website/astro-church-website/src/lib/bindings.js
Benjamin Slingo 53400fed17 Fix native bindings path for production build
- Change index.cjs to index.js in bindings to match build output
- Resolves module loading error in production environment
2025-08-28 15:55:11 -04:00

33 lines
774 B
JavaScript

// First, rename the CommonJS file to .cjs
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
// Require the CommonJS module
const nativeBindings = require('../../index.js');
export const {
getChurchName,
fetchEventsJson,
fetchFeaturedEventsJson,
fetchSermonsJson,
fetchLivestreamArchiveJson,
fetchConfigJson,
getMissionStatement,
fetchRandomBibleVerseJson,
getStreamLiveStatus,
getLivestreamUrl,
getChurchAddress,
getChurchPhysicalAddress,
getChurchPoBox,
getContactPhone,
getContactEmail,
getFacebookUrl,
getYoutubeUrl,
getInstagramUrl,
submitContactV2Json,
validateContactFormJson,
fetchBulletinsJson,
fetchCurrentBulletinJson,
fetchBibleVerseJson,
submitEventJson
} = nativeBindings;