Skip to content
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

Incorrect polyfills & unexpected change of behavior 2023-12-19 #2801

Closed
MarcusCaspeco opened this issue Dec 19, 2023 · 4 comments
Closed

Incorrect polyfills & unexpected change of behavior 2023-12-19 #2801

MarcusCaspeco opened this issue Dec 19, 2023 · 4 comments

Comments

@MarcusCaspeco
Copy link

MarcusCaspeco commented Dec 19, 2023

What

Something changed on this URL today that gave us some unexpected errors: https://cdn.polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en,Intl.~locale.se,ResizeObserver. It does not seem to be working correctly, as none of these need to be polyfilled in Chrome but I am getting 382kb of overrides. Full contents found here: https://gist.github.com/MarcusCaspeco/3d08928e50b4f370aacfcdaa83e772e3

Furthermore, when I remove the .min part of the URL, I expect to see the full script without minification, but instead I get this (this should be the output of both the .min and the non-minified script:)

/*
 * Polyfill service v3.111.0
 * For detailed credits and licence information see https://polyfill.io.
 * 
 * Features requested: Intl.~locale.en,Intl.~locale.se,ResizeObserver
 * 
*/


/* No polyfills needed for current settings and browser */

I am on the latest stable version of Chrome on Windows.

Details

We have been using following polyfill CDN URL in production for a long time: https://cdn.polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en,Intl.~locale.se,ResizeObserver.

Something changed today which gave us unexpected errors, likely due to a conflict with other packages. We can't go back in time to verify and check exactly what happened, but we think this file used to be empty but now it isn't.

Our workaround was to simply remove the polyfills as these features are now supported by all browsers that we need to support.

@MarcusCaspeco MarcusCaspeco changed the title Script from CDN was changed 2023-12-19 Incorrect polyfills & unexpected change in behavior 2023-12-19 Dec 19, 2023
@MarcusCaspeco MarcusCaspeco changed the title Incorrect polyfills & unexpected change in behavior 2023-12-19 Incorrect polyfills & unexpected change of behavior 2023-12-19 Dec 19, 2023
@Hagendorn
Copy link

We run today also in this same problem with this polyfill URL:
https://cdn.polyfill.io/v3/polyfill.min.js?features=default,Array.prototype.includes,Array.prototype.find,NodeList.prototype.forEach,Element.prototype.scroll,fetch

@MarcusCaspeco
Copy link
Author

Another workaround, if the polyfill script cannot be removed, might be to remove the cdn. part like the documentation suggests today.

https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en,Intl.~locale.se,ResizeObserver seems correct to me (no overrides)

@JakeChampion
Copy link
Collaborator

Hi all, thanks for the issue, I believe I have now fixed this caching issue, could you please let me know if you still see incorrect responses once you've cleared your browser cache?

@MarcusCaspeco
Copy link
Author

LGTM 👍 Thanks for the quick response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants