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(baseUrl) { const res = await fetch(new URL("index.html", baseUrl).toString()); 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(/