build(cdn): Ensure ES5 bundles do not use non-ES5 code#7550
Conversation
size-limit report 📦
|
| @@ -0,0 +1,40 @@ | |||
| // Sentry ES5 polyfills | |||
There was a problem hiding this comment.
My only concern here is that we may interfere with polyfills that users themselves added 🤔 but I guess if that's the case users need to make sure to add the polyfills before they add sentry (which they should have done already anyhow in order for Sentry not to break).
There was a problem hiding this comment.
Whatever we do here will be better than what already exists, so I think this is fine. We are being good citizens via the in check on the prototype anyway.
Lms24
left a comment
There was a problem hiding this comment.
As discussed, I think it's okay for us to ship the simple polyfills for now. We can reevaluate if users report problems with that.
Also as discussed, we can disable the new ESLint rule on framework SDKs on a case-by-case basis so no need for this to happen now.
To avoid accidentally including non-ES5 code.
To avoid accidentally including non-ES5 code.
This does three things:
validate:es5command that checks that no non-ES5 syntax is in the ES5 bundle.arr.find()To avoid issues like #7541 in the future.