Title: Don't insert Svelte preprocessor code in script module in Svelte 5. · Issue #17113 · getsentry/sentry-javascript · GitHub
Open Graph Title: Don't insert Svelte preprocessor code in script module in Svelte 5. · Issue #17113 · getsentry/sentry-javascript
X Title: Don't insert Svelte preprocessor code in script module in Svelte 5. · Issue #17113 · getsentry/sentry-javascript
Description: Here is the diff that solved my problem: diff --git a/node_modules/@sentry/svelte/build/esm/preprocessors.js b/node_modules/@sentry/svelte/build/esm/preprocessors.js index 62f0b46..600c653 100644 --- a/node_modules/@sentry/svelte/build/e...
Open Graph Description: Here is the diff that solved my problem: diff --git a/node_modules/@sentry/svelte/build/esm/preprocessors.js b/node_modules/@sentry/svelte/build/esm/preprocessors.js index 62f0b46..600c653 100644 -...
X Description: Here is the diff that solved my problem: diff --git a/node_modules/@sentry/svelte/build/esm/preprocessors.js b/node_modules/@sentry/svelte/build/esm/preprocessors.js index 62f0b46..600c653 100644 -...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/17113
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Don't insert Svelte preprocessor code in script module in Svelte 5.","articleBody":"Here is the diff that solved my problem:\n\n```diff\ndiff --git a/node_modules/@sentry/svelte/build/esm/preprocessors.js b/node_modules/@sentry/svelte/build/esm/preprocessors.js\nindex 62f0b46..600c653 100644\n--- a/node_modules/@sentry/svelte/build/esm/preprocessors.js\n+++ b/node_modules/@sentry/svelte/build/esm/preprocessors.js\n@@ -95,7 +95,7 @@ function shouldInjectFunction(\n // because the code inside is not executed when the component is instantiated but\n // when the module is first imported.\n // see: https://svelte.dev/docs#component-format-script-context-module\n- if (attributes.context === 'module') {\n+ if (attributes.module || attributes.context === 'module') {\n return false;\n }\n \n```\n\nThe attributes changed in Svelte 5. In asynchronously loaded components it started to fail.","author":{"url":"https://github.com/richardjelinek-fastest","@type":"Person","name":"richardjelinek-fastest"},"datePublished":"2025-07-21T13:42:00Z","url":"https://github.com/getsentry/sentry-javascript/issues/17113"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bcc532aa-8d09-a2ad-ae43-19e0a5cb4ecf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF72:345C43:D4032:11DD28:6B0595BB |
| html-safe-nonce | 94699fbc6a1ad5d3880c02e71962f2bfeb0f2e9c522cd1ded4b1b7de727ae529 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjcyOjM0NUM0MzpENDAzMjoxMUREMjg6NkIwNTk1QkIiLCJ2aXNpdG9yX2lkIjoiNTQxNjY1NjMwNjAxMTg4Nzk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7858430246b1da70b28fe1852fee55bcba27f74f48376658d064057c7d7527c7 |
| hovercard-subject-tag | issue:3248726555 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/17113/issue_layout |
| twitter:image | https://opengraph.githubassets.com/279e1b74f0c8c63f8884da9a55835d0033afab29ab352a990a7a7421eb3ca9d6/getsentry/sentry-javascript/issues/17113 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/279e1b74f0c8c63f8884da9a55835d0033afab29ab352a990a7a7421eb3ca9d6/getsentry/sentry-javascript/issues/17113 |
| og:image:alt | Here is the diff that solved my problem: diff --git a/node_modules/@sentry/svelte/build/esm/preprocessors.js b/node_modules/@sentry/svelte/build/esm/preprocessors.js index 62f0b46..600c653 100644 -... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | richardjelinek-fastest |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width