From e7b4c6ddbb212df166c63b0db60ebee4f57feda0 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Wed, 3 Sep 2025 14:09:22 +0000 Subject: [PATCH] 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 --- server/routes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes.ts b/server/routes.ts index e004aa2..cba49c5 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -737,8 +737,8 @@ export async function registerRoutes(app: Express): Promise { 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');