Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(browser): Add moduleMetadataIntegration lazy loading support #13817

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

gilisho
Copy link
Contributor

@gilisho gilisho commented Sep 26, 2024

This PR fixes #13803, and adds support for moduleMetadataIntegration to be lazy loaded, in this manner.
This integration is crucial for the micro-frontend recommended solution.

Note: I'll also try to create a PR for version ^7.0.

@chargome
Copy link
Member

chargome commented Oct 2, 2024

@gilisho would you mind adding a test that simulates lazy loading the integration? (e.g. in dev-packages/browser-integration-tests/suites/integrations

@gilisho
Copy link
Contributor Author

gilisho commented Oct 3, 2024

Sure @chargome, added a test.

@s1gr1d s1gr1d requested a review from mydea October 4, 2024 07:14
@mydea
Copy link
Member

mydea commented Oct 7, 2024

Note: I'll also try to create a PR for version ^7.0.

Just FYI, the lazyLoadIntegration() API was only introduced in v8, so nothing to backport to v7 there!

@gilisho gilisho requested a review from mydea November 10, 2024 08:45
@mydea mydea merged commit b9e85c1 into getsentry:develop Nov 11, 2024
127 checks passed
lforst pushed a commit that referenced this pull request Nov 11, 2024
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #13817

Co-authored-by: mydea <[email protected]>
mydea pushed a commit that referenced this pull request Nov 11, 2024
…13822)

This PR fixes #13803. The corresponding PR for latest major version is
#13817.

I saw the bundles generation for integration is happening in
`@sentry/integrations`, so I added a corresponding file for
`modulemetadata` in this package that exports that integration from
`@sentry/core`, so that the bundle actually gets created for this
integration as needed.
@gilisho gilisho deleted the modulemetadata-bundle branch November 12, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Sentry.moduleMetadataIntegration is not a function when using loader script
3 participants