Open tisto opened 2 years ago
I mean, if we think about it, if the default webpack mechanisms for loading modules fail and that code runs in production, you have bigger issues than sentry not being loaded by default.
I'm +1 on making sentry lazyload by default.
Is your feature request related to a problem? Please describe.
Volto currently loads the sentry js library with 70kb no matter if it is used or not.
Describe the solution you'd like
I guess it is not possible to lazy load the library since it needs to be around in case of an error. Though, maybe we could make sentry optional in the config.js ("sentry=false" by default) to reduce the bundle size for sites that do not use Sentry.