Title: @sentry/integrations uses CommonJS for localforage breaking ESM compatibility · Issue #3401 · getsentry/sentry-javascript · GitHub
Open Graph Title: @sentry/integrations uses CommonJS for localforage breaking ESM compatibility · Issue #3401 · getsentry/sentry-javascript
X Title: @sentry/integrations uses CommonJS for localforage breaking ESM compatibility · Issue #3401 · getsentry/sentry-javascript
Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...
Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3401
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@sentry/integrations uses CommonJS for localforage breaking ESM compatibility","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n- [ ] ~Provide a link to the affected event from your Sentry account~ n/a\r\n\r\n## Package + Version\r\n\r\n- [x] `@sentry/browser@6.2.5` \r\n- [ ] ~`@sentry/node`~ n/a\r\n- [ ] ~`raven-js`~ n/a\r\n- [ ] ~`raven-node` _(raven for node)_~ n/a\r\n- [ ] other: `@sentry/integrations@6.2.5`\r\n\r\n### Version:\r\n\r\n```\r\n @sentry/integrations@6.2.5\r\n```\r\n\r\n## Description\r\n\r\nUsing `require` breaks ESM builds.\r\n\r\nWe're evaluating [snowpack](https://snowpack.dev) which requires all deps to be be ESM compatible. Everything in our project works except for `@sentry/integrations`.\r\n\r\nBest we can tell it's due to using CommonJS's `require`:\r\n\r\nhttps://github.com/getsentry/sentry-javascript/blob/d98f5d66353158177cea6e98958ccd75294efbd8/packages/integrations/src/offline.ts#L7\r\n\r\n\r\n\r\nWithout being overly prescriptive it seems like the `import * as localForageType from 'localforage';` could be used and no `require` is necessary.\r\n\r\nhttps://github.com/getsentry/sentry-javascript/blob/d98f5d66353158177cea6e98958ccd75294efbd8/packages/integrations/src/offline.ts#L4 ","author":{"url":"https://github.com/beaucollins","@type":"Person","name":"beaucollins"},"datePublished":"2021-04-15T22:00:42Z","url":"https://github.com/getsentry/sentry-javascript/issues/3401"}
| 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:5da327f2-b357-c2cb-ca8b-90da5bbd2a6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C11C:31EC7:54BEA:75041:6B043113 |
| html-safe-nonce | ade302889350d2a658102c4ea4bf8d67f37f6a787c01bee12914f91bedc7c67c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTFDOjMxRUM3OjU0QkVBOjc1MDQxOjZCMDQzMTEzIiwidmlzaXRvcl9pZCI6IjE3ODUwMzM3ODIwNDc1NTE3NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 91646cb9d9b655e47c0a703f3f5e227997058ea9a5f535a720eacad60b38c51a |
| hovercard-subject-tag | issue:859279437 |
| 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/3401/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3e92c9bfff041b6aa1e53848ac6782a09f145ff90f48b940d1b0f2e3c0009a6c/getsentry/sentry-javascript/issues/3401 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3e92c9bfff041b6aa1e53848ac6782a09f145ff90f48b940d1b0f2e3c0009a6c/getsentry/sentry-javascript/issues/3401 |
| og:image:alt | Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | beaucollins |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| 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 | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| 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