Bundle size monitoring
Read this article to learn more about how to make bundle size tracking work well on your website and when you'll get a notification.
How to make bundle size tracking work
To track the size of individual bundles DebugBear needs to be able to identify a specific bundle even if the exact URL varies. Here are some bundle paths where this works well:
In each case only one part of the URL changes, and then bundle name
app stays consistent.
These are examples of paths that make bundle monitoring difficult:
In both cases there is no recognizable bundle name. The second case is very common when doing bundle splitting with Webpack. By default webpack will use a number as the bundle name.
To achieve a more consistent bundle name you can use a
webpackChunkName comment when loading the chunk in your code:
import(/* webpackChunkName: "main-app" */ "./main-app")
DebugBear will alert you if the size of your bundles change. Learn more about different types of notifications.
Bundle alerts will notify you about any changes over 200B. However, common third parties are muted by default, so you don't get an alert whenever the Intercom becomes 3kB bigger.