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

@babel/polyfill pt2 electric boogaloo #4

Open
corydickson opened this issue Dec 18, 2019 · 1 comment
Open

@babel/polyfill pt2 electric boogaloo #4

corydickson opened this issue Dec 18, 2019 · 1 comment

Comments

@corydickson
Copy link
Member

When trying to use this library in typescript project like so:

import EthRegistry from 'eth-registry';

const registry = new EthRegistry(); // use default provider

I get the following error:

./node_modules/idempotent-babel-polyfill/node_modules/@babel/polyfill/lib/noConflict.js
Module not found: Can't resolve 'core-js/modules/web.dom-collections.iterator' in '/Users/cory.dickson/GitHub/eth-registry-frontend/node_modules/idempotent-babel-polyfill/node_modules/@babel/polyfill/lib'

This seems to be related #3 and #2 but should be fixed by switching over to @babel/polyfill>=7.4.0. I've tried other workarounds to no avail, such as bringing an older version of core-js in the entry of my application or symlinking the paths(too hacky).

.babelrc

{
  "presets": [
    "@babel/env",
    {
      "useBuiltIns": "usage",
      "corejs": 3
    }
    "@babel/preset-typescript",
  ],
  "plugins": [
    "@babel/proposal-class-properties",
    "@babel/proposal-object-rest-spread"
  ]
}
@corydickson
Copy link
Member Author

Maybe we can use the same polyfill version in walletconnect as well @pedrouid?

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

No branches or pull requests

1 participant