Update server to use dynamic imports for path and fs modules

Refactor server/routes.ts to use dynamic `import('path')` and `import('fs')` instead of `require()`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/3dnI7Tc
This commit is contained in:
sebastjanartic 2025-09-03 14:09:22 +00:00
parent 9c24316641
commit e7b4c6ddbb

View File

@ -737,8 +737,8 @@ export async function registerRoutes(app: Express): Promise<Server> {
try {
console.log('📸 Serving custom social image...');
const path = require('path');
const fs = require('fs');
const path = await import('path');
const fs = await import('fs');
const imagePath = path.join(__dirname, '..', 'client', 'public', 'social-share-image.png');