René's URL Explorer Experiment


Title: [@sentry/svelte] Component tracking with withSentryConfig + webpack breaks Svelte 5 runes mode · Issue #15259 · getsentry/sentry-javascript · GitHub

Open Graph Title: [@sentry/svelte] Component tracking with withSentryConfig + webpack breaks Svelte 5 runes mode · Issue #15259 · getsentry/sentry-javascript

X Title: [@sentry/svelte] Component tracking with withSentryConfig + webpack breaks Svelte 5 runes mode · Issue #15259 · getsentry/sentry-javascript

Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...

Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...

X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/15259

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[@sentry/svelte] Component tracking with withSentryConfig + webpack breaks Svelte 5 runes mode","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/svelte\n\n### SDK Version\n\n8.52.1\n\n### Framework Version\n\nSvelte v5.19.6\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\nRepro: https://github.com/scottohara/svelte5-withsentryconfig-bug\n\nThe issue occurs when the following is true:\n1. You have a Svelte component that uses runes (e.g. `let now = $state(new Date().toString());`)\n2. The app is build using webpack + svelte-loader\n3. You wrap the options passed to svelte-loader with `withSentryConfig()` to enable component tracking, e.g.\n\n```js\nexport default {\n  mode: \"production\",\n  module: {\n    rules: [\n      {\n        test: /\\.svelte$/u,\n        loader: \"svelte-loader\",\n        options: withSentryConfig({\n          compilerOptions: {...}\n        })\n      }\n    ]\n  }\n}\n```\n\n### Steps to Reproduce\n\n### Setup\n\n```sh\ngit clone https://github.com/scottohara/svelte5-withsentryconfig-bug.git\ncd svelte5-withsentryconfig-bug\nnpm install\nwebpack\n```\n\n### Verify working\nAt this point, open the file `dist/index.html` in your browser. You should see a message like:\n> The time is `\u003cthe current date and time>`\n\nThis confirms that app builds & runs successfully _without_ component tracking.\n\n### Enable component tracking\n\n```sh\nWITH_SENTRY=1 webpack\n```\n\nThe `WITH_SENTRY=1` environment variable instructs the webpack config to wrap the svelte-loader options in `withSentryConfig()`.\nNow open (or refresh) the `dist/index.html` page in your browser.  You should now see a blank page, and in the browser console the following error:\n\n> Uncaught Error: https://svelte.dev/e/lifecycle_legacy_only\n\nWhen caught, the error message is in fact:\n\n> `beforeUpdate(...)` cannot be used in runes mode\n\n### Expected Result\n\nWhen component tracking is enabled (in the example repo, by passing `WITH_SENTRY=1` to the webpack command;  the app should not error and should display the same as when component tracking is disabled.\n\n### Actual Result\n\n### With component tracking disabled\nA successful render, and no console errors:\n\n![Image](https://github.com/user-attachments/assets/3931c915-b0f9-4e5d-a93f-d2172b9e0ce0)\n\n### With component tracking enabled\nA failed render (blank page), and the Svelte legacy error:\n\n![Image](https://github.com/user-attachments/assets/a048d40d-cd35-46dc-811b-0f361847ac7c)\n\n### Why does this happen?\nI believe that the root cause is the code in `@sentry/svelte` that does component tracking uses the `beforeUpdate(...)` lifecycle method.\nThis lifecycle method is [deprecated in Svelte 5](https://svelte.dev/docs/svelte/lifecycle-hooks#Deprecated:-beforeUpdate-afterUpdate).\n\nIt may be the case that `withSentryConfig()` was never designed to be used with webpack + svelte-loader (as it doesn't seem to have any issues when used in a Vite-based Svelte5 project).\n\nHowever prior to Svelte 5 and runes mode, using `withSentryConfig` in webpack + svelte-loader in this way did not throw any errors.\n\n","author":{"url":"https://github.com/scottohara","@type":"Person","name":"scottohara"},"datePublished":"2025-02-03T04:47:26Z","url":"https://github.com/getsentry/sentry-javascript/issues/15259"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:68096d61-3a45-b052-75ca-1b984f0002b0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCD06:137FF:B88152:E98C37:6B036DFF
html-safe-noncec5df043d0cdd21a7d6b753b168140922bef5b33f2810ea3ec874b4ffe1ffce1d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDA2OjEzN0ZGOkI4ODE1MjpFOThDMzc6NkIwMzZERkYiLCJ2aXNpdG9yX2lkIjoiNzMwNDk4MzQ3NTIyNzE2MDA2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace37bc259dc7232b34cd1dfe2e35a07eb5e7b01d3b5a9d66c1b87458eaadcb04a
hovercard-subject-tagissue:2826395873
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/15259/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f8f50160cf46ed6f686b5069d619c654167f0c8b382b2e24c58e972a40dd9fc5/getsentry/sentry-javascript/issues/15259
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f8f50160cf46ed6f686b5069d619c654167f0c8b382b2e24c58e972a40dd9fc5/getsentry/sentry-javascript/issues/15259
og:image:altIs there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamescottohara
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/15259#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F15259
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F15259
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/15259
Reloadhttps://github.com/getsentry/sentry-javascript/issues/15259
Reloadhttps://github.com/getsentry/sentry-javascript/issues/15259
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues345 (345)https://github.com/getsentry/sentry-javascript/issues
Pull requests77 (77)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/15259
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/15259
[@sentry/svelte] Component tracking with withSentryConfig + webpack breaks Svelte 5 runes modehttps://github.com/getsentry/sentry-javascript/issues/15259#top
https://github.com/Lms24
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com/scottohara
scottoharahttps://github.com/scottohara
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#issue-2826395873
https://github.com/getsentry/sentry-javascript/issueshttps://github.com/getsentry/sentry-javascript/issues
https://docs.sentry.io/https://docs.sentry.io/
https://github.com/getsentry/sentry-javascript/releaseshttps://github.com/getsentry/sentry-javascript/releases
https://github.com/scottohara/svelte5-withsentryconfig-bughttps://github.com/scottohara/svelte5-withsentryconfig-bug
https://svelte.dev/e/lifecycle_legacy_onlyhttps://svelte.dev/e/lifecycle_legacy_only
https://private-user-images.githubusercontent.com/289327/408966440-3931c915-b0f9-4e5d-a93f-d2172b9e0ce0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIi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jIwMjYxMTIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTEyMlQyMjM0MzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYzRmOTE4MDFhZDczODNmNDQ4OTUxZGNiOTgyNjU3ZDU3ZDA4NTU2ZjIyOWQ0YWU0NDg4MWFmODBhNjlkMGJkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.-FKSiIZYxPxf_5VzHMchhyrpqIDsaNi2c6MG-L1qtRs
deprecated in Svelte 5https://svelte.dev/docs/svelte/lifecycle-hooks#Deprecated:-beforeUpdate-afterUpdate
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-16155890461
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-16155891080
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259
github-actionshttps://github.com/apps/github-actions
Package: sveltehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20svelte%22
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-16155891496
https://github.com/Lms24
Lms24https://github.com/Lms24
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#issuecomment-2630468497
@scottoharahttps://github.com/scottohara
#15262https://github.com/getsentry/sentry-javascript/pull/15262
an effect.pre/tick combinationhttps://svelte.dev/docs/svelte/lifecycle-hooks#tick
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-16159485941
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259
Lms24https://github.com/Lms24
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-16162863152
https://github.com/Lms24
Lms24https://github.com/Lms24
on Feb 3, 2025https://github.com/getsentry/sentry-javascript/issues/15259#issuecomment-2631492875
#15262https://github.com/getsentry/sentry-javascript/pull/15262
https://github.com/Lms24
Lms24https://github.com/Lms24
on Feb 12, 2025https://github.com/getsentry/sentry-javascript/issues/15259#issuecomment-2654169769
Lms24https://github.com/Lms24
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 12, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-16283509395
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Aug 12, 2025https://github.com/getsentry/sentry-javascript/issues/15259#event-19124578089
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/15259
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/15259
Lms24https://github.com/Lms24
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.