const base = 'http://localhost:4173/web/index.html'; const response = await fetch(base); if (!response.ok) throw new Error(`preview page returned ${response.status}`); const html = await response.text(); const script = html.match(/