Symptom: every page blank in vite dev, console shows Failed to fetch dynamically imported module .../generated/client/app.js and a 404 for /node_modules/.vite/deps/client/svelte4BrowserTracing.js; server logs optimized info should be defined / 'file does not exist ... which is in the optimize deps directory'.
Cause: since @sentry/sveltekit 10.69, sentrySvelteKit() registers a sentry-sveltekit-browser-tracing-variant plugin that (a) dev-excludes @sentry/sveltekit from optimizeDeps and (b) uses a resolveId hook to redirect a virtual @sentry/sveltekit/browser-tracing-variant import to build/esm/client/svelte4BrowserTracing.js (or the svelte5 variant). If your vite.config also lists @sentry/sveltekit in optimizeDeps.include (a common perf tweak), the include wins, esbuild pre-bundles the SDK, and the pre-bundled chunk bakes in a dead deps/client/svelte4BrowserTracing.js path that the resolveId hook can never intercept.
Fix: remove @sentry/sveltekit from optimizeDeps.include (keeping @sentry/core/@sentry/svelte is fine) and clear node_modules/.vite. The plugin's own dev exclusion then applies and the redirect works.