-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feature/intl : Material-ui does'nt works on safari (mac, ios) #639
Comments
To solve it add
to
|
This should be solved clever. |
Yes you're right. clientIntlPolyfill may look like
|
import areIntlLocalesSupported from 'intl-locales-supported';
import { locales } from './config'; Bad idea to import if (window.Intl) {
// Determine if the built-in `Intl` has the locale data we need.
if (!areIntlLocalesSupported(locales)) {
// `Intl` exists, but it doesn't have the data we need, so load the
// polyfill and replace the constructors with need with the polyfill's.
const IntlPolyfill = require('intl'); This will pack polyfill into bundle don't matter if it will be really used. Intl.NumberFormat = IntlPolyfill.NumberFormat;
Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat;
}
} else {
// No `Intl`, so use and load the polyfill.
window.Intl = require('intl'); So this, bundle, don't matter if it will be really used. } Code splitting and |
🚜 (as I would like to track this issue) |
@mika75 thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion. NOTE: The |
Material-ui does'nt works on safari (mac, ios).
step to reproduce :
clone : branch feature/intl
add
"material-ui": "0.14.4"
, topackage.json
and add some material-ui components.
All events are breaks
Safari console
[React Intl] The Intl APIs must be available in the runtime, and do not appear to be built-in. An Intl polyfill should be loaded.↵See: http://formatjs.io/guides/runtime-environments/"
The text was updated successfully, but these errors were encountered: