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

feat: add es5 target #6

Closed
wants to merge 3 commits into from
Closed

feat: add es5 target #6

wants to merge 3 commits into from

Conversation

menduz
Copy link
Member

@menduz menduz commented Apr 24, 2018

... to support create-react-app

@menduz menduz changed the title chore: add es5 target feat: add es5 target Apr 24, 2018
@nicosantangelo
Copy link
Contributor

We're running into a problem with web3-provider-engine in two places. They are using two builds the same way we're doing here, so to make the import work, we sould first update the web3-provider-engine dependency to ^14 and then change the following:

diff --git a/src/ethereum/wallets/LedgerWallet.ts b/src/ethereum/wallets/LedgerWallet.ts
- import ProviderEngine from 'web3-provider-engine'
- import RpcSubprovider from 'web3-provider-engine/subproviders/rpc'
+ import ProviderEngine from 'web3-provider-engine/dist/es5'
+ import RpcSubprovider from 'web3-provider-engine/dist/es5/subproviders/rpc'

After fixing that, we encounter the same error on ledger-wallet-provider, where they're importing hooked-wallet from the non-es5 version. I'm not sure there's much of a choice here other than using this fork which contains this commit.

diff --git a/package.json b/package.json
- "ledger-wallet-provider": "^2.0.0-beta.2",
+ "ledger-wallet-provider": "https://github.com/decentraland/ledger-wallet-provider.git#releases"

Any other ideas?

@nicosantangelo
Copy link
Contributor

Fixed by using this hack facebook/create-react-app#1125 (comment)

Will wait until create-react-app updates to transpile node_modules

@nicosantangelo nicosantangelo deleted the chore/add-es5-target branch April 26, 2018 10:22
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

Successfully merging this pull request may close these issues.

None yet

2 participants