import { mount } from "svelte"; import * as Sentry from "@sentry/browser"; // Errors only — no tracing, no replay. Without a DSN baked at build time // (VITE_SENTRY_DSN in .env.production) this is entirely inert. if (import.meta.env.VITE_SENTRY_DSN) { Sentry.init({ dsn: import.meta.env.VITE_SENTRY_DSN, environment: "production" }); } // /watch/ is the public share page — one turn, anyone may look. It // loads its own component so the full app (and its live socket appetite) // stays out of a shared link's way. const target = document.getElementById("app")!; const page = location.pathname.startsWith("/watch/") ? import("./SharePage.svelte") : import("./App.svelte"); page.then(({ default: Root }) => mount(Root, { target }));