-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Simplify/reorganize Micro Frontend Suport #9215
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Bundle ReportChanges will decrease total bundle size by 6 bytes ⬇️
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments but overall LGTM!
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
…support.mdx Co-authored-by: vivianyentran <[email protected]>
…support.mdx Co-authored-by: vivianyentran <[email protected]>
…support.mdx Co-authored-by: vivianyentran <[email protected]>
…support.mdx Co-authored-by: vivianyentran <[email protected]>
…support.mdx Co-authored-by: vivianyentran <[email protected]>
…support.mdx Co-authored-by: vivianyentran <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such a good change!
| different release cycles, you may want to identify these or route events to specific projects. This is especially useful if you've set up [module federation](https://module-federation.github.io/) or a similar frontend architecture. | ||
|
|
||
| ## Identifying the source of errors | ||
| Below we offer two approaches. Please note that `Sentry.init()` must be called only once, doing otherwise will result in undefined behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very good to mention. I wonder if we should highlight this even stronger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| First, to identify the source of an error, you must inject metadata that helps identify | ||
| which bundles were responsible for the error. You can do this with any of the | ||
| Sentry bundler plugins by enabling the `_experiments.moduleMetadata` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to mention here that this should also work for vite and esbuild. I know that we mention the packages above but I am not sure if people will connect the dots. Doesn't have to be in this PR though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added, lmk what you think
|
|
||
| ```javascript | ||
| import * as Sentry from "@sentry/browser"; | ||
| import { init, makeFetchTransport, moduleMetadataIntegration, makeSimpleMultiplexedTransport, MULTIPLEXED_TRANSPORT_EXTRA_KEY } from "@sentry/browser"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { init, makeFetchTransport, moduleMetadataIntegration, makeSimpleMultiplexedTransport, MULTIPLEXED_TRANSPORT_EXTRA_KEY } from "@sentry/browser"; | |
| import { init, makeFetchTransport, moduleMetadataIntegration, MULTIPLEXED_TRANSPORT_EXTRA_KEY } from "@sentry/browser"; |
Once we added the makeSimpleMultiplexedTransport API we can revisit this but for now I'd leave it away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good.
Reverting sample code to original including this change (as it hasn't been tested)
- [Automatic] remove redundant if (routeTo.length) { check for empty array (done in matcher)
@lforst We should simplify the API sooner than later though. I feel like current sample code looks convoluted to the point of customers thinking "surely there must be an easier/more elegant way to do it, let me see what those other blog posts that showed up in search say"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, right now it is unfortunately not a priority for us and I'd like to avoid us losing focus but maybe I can sneak your PR in somehow.
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
…support.mdx Co-authored-by: Luca Forstner <[email protected]>
|
Hi @vivianyentran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one more tiny edit. Looks good! Thank you for this update!
docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
Outdated
Show resolved
Hide resolved
…support.mdx Co-authored-by: vivianyentran <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Pre-merge checklist
If you work at Sentry, you're able to merge your own PR without review, but please don't unless there's a good reason.
Description of changes
beforeSendcode that didn't get theslice(-1)fix.Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Extra resources