import { readFile, rm, writeFile } from 'node:fs/promises'; import path from 'node:path'; const output = path.resolve('offline-dist'); const htmlPath = path.join(output, 'index.html'); const scriptPath = path.join(output, 'assets', 'app.js'); const stylePath = path.join(output, 'assets', 'app.css'); const packageJson = JSON.parse(await readFile(path.resolve('package.json'), 'utf8')); let html = await readFile(htmlPath, 'utf8'); html = html.replace(/