Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

WIP: Import fix for vscode integration #1215

Merged
merged 1 commit into from
Jun 18, 2019

Conversation

0mkara
Copy link
Collaborator

@0mkara 0mkara commented Jun 13, 2019

No description provided.

@GrandSchtroumpf
Copy link
Collaborator

Have you try : import * as Web3 from 'web3' ?

@0mkara
Copy link
Collaborator Author

0mkara commented Jun 13, 2019

It gives us typescript compil error.

src/deployer.ts:4:23 - error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.

4 import * as Web3 from 'web3';

And yeah "esModuleInterop": true, is already set to tsconfig.

@GrandSchtroumpf
Copy link
Collaborator

I think this is a problem specific to Web3 library. We might want to get ride of it at some point and fallback to ethers.

@0mkara
Copy link
Collaborator Author

0mkara commented Jun 18, 2019

Yes there are so many weird problems with Web3 library, when used with Typescript.

@yann300 yann300 merged commit 3e4cd34 into master Jun 18, 2019
@0mkara 0mkara deleted the remix_tests_import_fix_webpack_vscode branch June 18, 2019 07:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants