question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not support new corejs@3

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

When compiling with .babelrc of

"presets": [
    "@babel/preset-react", 
    ["@babel/preset-env", 
      {
        "useBuiltIns": "usage",
        "corejs": "core-js@3",
        "targets": { "browsers": "> 10%" },
        "modules": false 
      }
    ]
  ],
  "plugins": ["@babel/plugin-syntax-dynamic-import", "@babel/plugin-transform-runtime"],

and core-js@3, the following output is produced

ERROR in ./node_modules/recharts/es6/polyfill.js
Module not found: Error: Can't resolve 'core-js/es6/math' in '${PATH}/node_modules/recharts/es6'
 @ ./node_modules/recharts/es6/polyfill.js 1:0-26
 @ ./node_modules/recharts/es6/index.js

ERROR in ./node_modules/recharts/es6/polyfill.js
Module not found: Error: Can't resolve 'core-js/es6/number' in '${PATH}/node_modules/recharts/es6'
 @ ./node_modules/recharts/es6/polyfill.js 2:0-28
 @ ./node_modules/recharts/es6/index.js

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: http://jsfiddle.net/ndLhnegs/).

What is the expected behavior?

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

Recharts v1.5.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
pedroabreucommented, Jul 2, 2019

Is there a specific reason for the library handling polyfills ? Seems something that should be the consumer responsibility

4reactions
gaillotacommented, Nov 22, 2019

I think you should update to core-js 3 as it fixes a number of issues

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use babel/corejs3/webpack correctly for IE11?
Have corejs: "3" and useBuiltIns: 'entry' to @babel/preset-env preset ... IE11 support - the error message relates to Symbol . core-js>=3 no ......
Read more >
How to add coreJS3 to pcf react to support browsers like IE11
I think by adding corejs3 and @babel/plugin-transform-runtime, PCF react would have better support for ie11. The other benefit of this is that ...
Read more >
babel-plugin-polyfill-corejs3 - npm
A Babel plugin to inject imports to core-js@3 polyfills. Latest version: 0.6.0, last published: 3 months ago.
Read more >
7.4.0 Released: core-js 3, static private methods and partial ...
Last but not least, both @babel/preset-env and @babel/transform-runtime now support core-js@3 , and @babel/template has some sweet new ...
Read more >
@babel/runtime-corejs3 - npm Package Health Analysis | Snyk
Learn more about @babel/runtime-corejs3: package health score, popularity, security, ... Latest version published 24 days ago ... No known security issues.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found