-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Recharts is not supporting in IE11 browser #1994
Comments
Just... give up on IE. Everyone knows it has bad compatibility. No one likes it anyway. |
Check your application's build process. Under all the turtles, you're most likely using Webpack and ultimately, Babel. You want to make sure you're emitting ES5 or whatever IE11 needs. |
Giving up on IE11 unfortunately isn't an option when your users are using it to access your application. There are still bits of IE11 in pockets of some userbases. But I don't think this is a library author's concern. The application's build process needs to take care of ensuring their user's browsers are compatible. |
@avindra, hi! I have the same issue. |
I tried following some of the suggestions at |
@njetsy Hi! Do you have any news about this problem? |
Same problem, could be an issue caused by the breaking changes introduced in v3 of d3-scale package which Recharts use: d3/d3-scale#167 |
This seems to be related to the I'm using babel, babel-preset-env with the default browser targets (which includes IE11), and webpack. I fixed this for my project by updating the babel-loader test to explicitly include Before: {
test: /\.(t|j)sx?$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel-loader',
}, After: {
test: /\.(t|j)sx?$/,
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules', 'recharts'),
],
loader: 'babel-loader',
}, |
I've came across the same error. It says It runs perfectly fine in Edit: I've just tried the |
I have the same problem on IE 11 and even a Firefox 38. In fact, Firefox < 51 seems to have a buggy handle of https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/for...of |
Please try recharts@2.0.0-beta.5 |
Does it work with |
I don't think the commit fix the issue for other projects those are using Recharts@^2, even latest beta.5. This commit only makes the Recharts demo portal works on IE 11. @xile611 I think we should evaluate the usage for v3 of d3-scale, which is the root cause. I don't think we should expect every projects using Recharts to add following if they want to support IE 11:
|
I can confirm that recharts@2.0.0-beta.5 did not resolve the issue. |
Reproduction link
https://github.com/recharts/recharts.git
Steps to reproduce
What is expected?
It should support in IE11 browser
What is actually happening?
From demo, the console error is "SCRIPT1004: Expected ';' app.c0b28b51d8d4505aaa2a.js (60108,20)"
From my project, the console error is "SCRIPT1053: Const must be initialized"
Until Recharts version 1.8.5 its working fine, its broken from 2.0.0-beta.0 and 2.0.0-beta.1 versions
Const and let are not supported in IE11 and below versions, I think polyfill need to be included.
The text was updated successfully, but these errors were encountered: