#!/usr/bin/env node import fs from "fs"; const file = "build/index.html"; const snippet = ``; const html = fs.readFileSync(file, "utf8"); if (html.includes(snippet)) { console.log("â„šī¸ Script already present, skipping"); process.exit(0); } if (!html.includes("")) { console.error("❌ not found in index.html"); process.exit(1); } const updated = html.replace("", ` ${snippet}\n `); fs.writeFileSync(file, updated); console.log("✅ Plausible script injected");