-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
change in v5: const {inspect} = require('util');
can lead to web bundle bloat
#26
Comments
I didn't realize people used this in the browser. We could maybe add We should probably also guard Line 8 in 480ed36
|
Thanks for this issue. I think this is a really handy lib and making it universal is a good idea! I support this approach:
Basically the only reason for using |
Yeah, we could probably just use JSON.stringify. |
Using Such change seems to be working well. |
@vladimiry A PR would be welcome :) |
Going to adjust tests and PR then. |
PR placed: #27. |
This was added in v5 for
deserializeError
:This adds about 8KB to web bundles, which can be significant, especially in projects not using
deserializeError
.Possible solutions:
serializeError
into a separate file that can be imported without thedeserializeError
code.deserializeError
into a new module.import
, addsideEffects: false
to thepackage.json
to enable tree shaking in the module.The text was updated successfully, but these errors were encountered: