import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // Read the built files const distPath = path.join(__dirname, '../dist'); const htmlPath = path.join(distPath, 'index.html'); const jsPath = path.join(distPath, 'index.js'); const cssPath = path.join(distPath, 'index.css'); // Read the original HTML built by Vite const originalHtml = `