Hi, When running next.js with react-intl in Safari in example https://github.com/zeit/next.js/tree/v3-beta/examples/with-react-intl i see error:


Chrome and Firefox is ok.
馃憖 Keeping my on this because I'll introduce react-intl soon to my project.
So would be nice to see this discussion
Which version of Safari are you using? I think until 10 they didn't had the Intl API, so you need to use a polyfill (I use polyfill.io)
Thanks @coluccini . 馃憤
My Safari version: Version 9.1.2 (11601.7.7) and you right :)
@lucasfeliciano You can try this solution:
I try to change https://github.com/zeit/next.js/blob/v3-beta/examples/with-react-intl/components/Layout.js follow code and It work for me:
export default injectIntl(({intl, title, children}) => {
const polyfillURL = 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.' + intl.locale;
return (
<div>
<Head>
<meta name='viewport' content='width=device-width, initial-scale=1' />
<title>{title || intl.formatMessage(messages.title)}</title>
<script src={polyfillURL}></script>
</Head>
<header>
<Nav />
</header>
{children}
</div>
)
})
:+1: You can add it in /pages/_document.js as well.
If this works, could you please send a pull request for it, then everyone has the fix 鉂わ笍
Of course! 馃憠 https://github.com/zeit/next.js/pull/2283
Thank you team!
I got the same error when trying to use outdated IE10 after applying this solution. (By IE11's debug bar on Windows10)
Most helpful comment
Of course! 馃憠 https://github.com/zeit/next.js/pull/2283