class StartupError extends Error {} /* * We need to know the bundle path before we can fetch the sourcemap files. In a production environment, we can guess * it using this. */ async function getBundleName() { const res = await fetch("../index.html"); if (!res.ok) { throw new StartupError(`Couldn't fetch index.html to prefill bundle; ${res.status} ${res.statusText}`); } const index = await res.text(); return index.split("\n").map((line) => line.match(/