You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/micro-frontend-support.mdx
+31-10Lines changed: 31 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,11 @@ keywords:
14
14
If your frontend includes JavaScript bundles from multiple sources with
15
15
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.
16
16
17
-
Below we offer two approaches. Please note that `Sentry.init()` must be called only once, doing otherwise will result in undefined behavior.
17
+
Below we offer two approaches.
18
+
19
+
<Note>
20
+
In all cases `Sentry.init()` must never be called more than once, doing so will result in undefined behavior.
21
+
</Note>
18
22
19
23
## Automatically Route Errors to Different Projects Depending on Module
20
24
@@ -36,7 +40,8 @@ Requires SDK version `7.59.0` or higher.
36
40
37
41
First, to identify the source of an error, you must inject metadata that helps identify
38
42
which bundles were responsible for the error. You can do this with any of the
39
-
Sentry bundler plugins by enabling the `_experiments.moduleMetadata` option.
43
+
Sentry bundler plugins by enabling the `_experiments.moduleMetadata` option. Example
44
+
below is for Webpack, but this is also supported in Vite, Rollup, and esbuild.
40
45
41
46
```javascript
42
47
// webpack.config.js
@@ -66,26 +71,42 @@ for the multiplexed transport to reference for routing.
66
71
In practice, here is what your Sentry initialization should look like:
0 commit comments