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

Import Error of react-intl in Safari. #100

Closed
jefferyvincent opened this issue Apr 2, 2015 · 7 comments
Closed

Import Error of react-intl in Safari. #100

jefferyvincent opened this issue Apr 2, 2015 · 7 comments
Labels

Comments

@jefferyvincent
Copy link

Hello,

I am using the react-hot-loader that uses webpack-dev-server.

I am seeing the following error in Safari when I try to import react-int as a ES6 module (using babel):
screen shot 2015-04-02 at 10 13 22 am

import {IntlMixin, FormattedDate } from 'react-intl';

Or

import ReactIntl, {IntlMixin, FormattedDate } from 'react-intl';
@jefferyvincent jefferyvincent changed the title Import Error of react-intl ES6 module in Safari. Import Error of react-intl in Safari. Apr 2, 2015
@ericf
Copy link
Collaborator

ericf commented Apr 2, 2015

Looks like you're missing the Intl.js polyfill that's needed for Safari since it doesn't yet have the Intl APIs built-in.

There are more details on the site:
http://formatjs.io/guides/runtime-environments/
http://formatjs.io/guides/runtime-environments/#client

@ericf ericf added the support label Apr 2, 2015
@jefferyvincent
Copy link
Author

Thanks! This fixed the issue with the missing Intl
npm install intl

import Intl from 'intl';
import {IntlMixin, FormattedDate } from 'react-intl';

However I still seeing this and I am wondering if it needs a loader for webpack:
screen shot 2015-04-02 at 1 34 40 pm

@ericf
Copy link
Collaborator

ericf commented Apr 2, 2015

Related to this: esnext/es6-module-transpiler#164
We'll have to revamp our build process at some point to not produce source maps for CommonJS modules.

@ericf ericf closed this as completed Apr 2, 2015
@jefferyvincent
Copy link
Author

Thanks! I'll look forward to the update.

@jefferyvincent
Copy link
Author

Still seeing these errors in build 1.4.0

@Dindaleon
Copy link

Any updates on this? I am getting these errors as well. I have several sites using react-intl but they are all broken in safari unless i disable react-intl.

@olivierlambert
Copy link

Hi lads, any news on this? Or a known workaround?

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

No branches or pull requests

4 participants