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
Now that the JS SDK supports ES2018 and forward would it be possible to use optional chaining internally to reduce bundle sizes? It is currently being blocked by Avoid using optional chaining eslint(@sentry-internal/sdk/no-optional-chaining) for non node SDKs.
Node should support it natively and the other targets should already be including the polyfills if I understand things correctly.
I don't expect any large size reductions but I don't really see any drawbacks to using it since it should be supported in all targets.
Solution Brainstorm
There are multiple places where this can be used I the JS SDKs but the biggest benefits would be to reduce statements like this:
I agree optional chaining would be a big improvement, but unfortunately it is ES2020, and we have a default minimum of ES2018 in our 8.x major version.
In our next major version we will evaluate using ES2020, which means we can adopt optional chaining! Closing this for now though.
Problem Statement
Now that the JS SDK supports ES2018 and forward would it be possible to use optional chaining internally to reduce bundle sizes? It is currently being blocked by
Avoid using optional chaining eslint(@sentry-internal/sdk/no-optional-chaining)
for non node SDKs.Node should support it natively and the other targets should already be including the polyfills if I understand things correctly.
I don't expect any large size reductions but I don't really see any drawbacks to using it since it should be supported in all targets.
Solution Brainstorm
There are multiple places where this can be used I the JS SDKs but the biggest benefits would be to reduce statements like this:
to just:
I would be happy to open some PRs myself if the mentioned ESLint rule is revised.
The text was updated successfully, but these errors were encountered: