getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.68k stars 1.49k forks source link

test(svelte): Add Svelte 5 E2E test app #11814

Closed Lms24 closed 3 weeks ago

Lms24 commented 3 weeks ago

In #11807 I added a SvelteKit+Svelte 5 E2E test. Let's also add a small Svelte 5 standalone/SPA app ensure we cover such apps as well.

Update: Turns out it was a good idea to add this test app because the app is running in Runes mode, as opposed to the SvelteKit+Svelte 5 app. Turns out, In Svelte 5 Runes mode, we can't track component updates anymore. Because of this limitation users would get a build error if they don't explicitly disable tracking component updates. I'll think about how we can solve this properly on Monday.

Until then, the workaround will be to just disable tracking component updates:

// svelte.config.js
const configWithSentry = withSentryConfig(config, {
  componentTracking: { 
    trackUpdates: false,  // <-- disable tracking updates
    trackComponents: true, 
    trackInit: true 
  },
});