-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
@sentry/node package size is pretty big #2090
Comments
💭 One simple opportunity would be to have the promise implementation being passed as input so the consumer can decide if a polyfill is needed. |
Using @sentry/browser in a React project and bundling with Parcel, ~102 kB of the bundle (more than 25% of the total size) comes from the Sentry dependency. If there's anything I can do to reduce the size of this dependency, let me know! 👍 |
@denizdogan it's 17.7kB gzipped - https://bundlephobia.com/result?p=@sentry/[email protected] 🤔 |
@kamilogorek That's weird, maybe it's just the way that I use Parcel that's making it this way? Because my output bundle size is 393.07 kB and using a bundle visualizer tool, it looks like @sentry/browser takes 38 kB. Then a bunch of other Sentry libraries (assuming they're dependencies) take up the rest of the 102 kB. |
@denizdogan can you explain how you visialize this exactly? I can take a look at it if you provide a small repro case |
@kamilogorek I've made a small reproduction repository with instructions here: https://github.com/denizdogan/sentry-parcel-bundle-size Thanks! |
@denizdogan not sure what's the state of Parcel 1, but I checked and it indeed produces much bigger bundle than let's say Webpack. However,
Add this parcel config to
|
@kamilogorek I'll just attribute the problem to Parcel 1 then :) Thanks for your help |
been lookin into why this hasnt been brought up... so according to webpack bundle visualizer, even after all terser optimizations, the browser version is still one of the biggest deps in our bundle: Is there any work being done to reduce this? i just find it hard to believe that the error reporting bundle is nearly as big as react (the core of the app) |
@ricardovanlaarhoven ditto! |
I can also confirm this as a big issue, probably the only reason why we are still considering to use other error reporting tools since performance is really important in most apps. In our vendor bundle Sentry is the third biggest dependency:
|
@peterbakonyi05 we already working on it, fingers crossed for a fast delivery :) |
@kamilogorek Amazing news, thank you! 🙏 |
@SentoxAIO Something seems to be wrong with that screenshot because gzipped size is 0. Gzipped size should be the most relevant for performance hit (even for Electron probably). If you check the screenshot I attached, stat size is 260kB but actual gzipped size shipped in the browser is 21kB |
Duplicate of #2707 will close to keep it tidy |
👋 hi there, I'm using Sentry for fatal error reporting on a CLI tool and a lambda server and I'm looking into moving from
raven
to@sentry/node
. However I noticed that the package size has increased from 170kB to 1.7MB.I'm trying to keep the CLI size down without so the parsing time is low when started, same for the server.
@sentry/node
raven
Inspecting locally the biggest offenders are:
Seems like the double
dist
andesm
output does not work in the size favor, thoughts?The text was updated successfully, but these errors were encountered: