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
Set usage isn't IE11-safe #2529
Comments
You have to add |
@longlho Already tried importing Not specifying a timezone (I'm using this polyfill just for that feature that works on Chrome and other browsers) has the same problem: What annoys me more is that white space at the end of the error string: |
Do u have a reproducible repo of some sort? Can you use |
@longlho same |
oh u didn't add any locale data for |
@longlho Didn't I? Look at the last line of the first post: import '@formatjs/intl-datetimeformat/add-all-tz' // Add ALL tz data |
That's timezone data which is separate from locale-data. See https://formatjs.io/docs/polyfills/intl-datetimeformat#simple |
Oh no... Will test it tomorrow. Is there any way to load the browser locale automatically? Thanks for your patience @longlho |
Unfortunately we do not get access to browser default locale due to fingerprinting privacy issue. |
@longlho So now it's working, but it does not find the timezone import '@formatjs/intl-getcanonicallocales/polyfill';
import '@formatjs/intl-locale/polyfill';
import '@formatjs/intl-pluralrules/polyfill'
import '@formatjs/intl-pluralrules/locale-data/en' // locale-data for en
import '@formatjs/intl-numberformat/polyfill'
import '@formatjs/intl-numberformat/locale-data/en' // locale-data for en
import '@formatjs/intl-datetimeformat/polyfill'
import '@formatjs/intl-datetimeformat/locale-data/en' // locale-data for en
import '@formatjs/intl-datetimeformat/add-all-tz' // Add ALL tz data |
hmm I can't reproduce this. Do you have a reproducible repo? What versions of things are you using? |
I was running into the same issue on IE11 and tracked it down to https://github.com/formatjs/formatjs/blob/main/packages/ecma402-abstract/IsValidTimeZoneName.ts . A Set instance is created by providing an iterable to the constructor, which is not supported in IE11. You can get it working by adding a Set polyfill. Might be good to change the |
thanks for the info @boschni that's something we can fix on our side |
Hi. I'm literally getting a
Missing locale data for
without more info, it's literally that message in IE11.Tested code:
Added dependencies:
Is there something I'm missing from the docs? I've been banging my head on the keyboard for hours.
The text was updated successfully, but these errors were encountered: