I am currently upgrading to latest 1.0 beta.27,
import { default as Web3 } from 'web3'; doesn't work . gives a error below
/node_modules/web3/index"' resolves to a non-module entity and cannot be imported using this construct.
Possible to pass the compile process:
var Web3 = require('web3');
This way Web3 lost type definitions though, even there is a index.d.ts inside node_modules/web3.
@helxsz this should be fixed after the PR #2000
@nivida the problem wasn't fixed, I'm still not able to use import Web3 from 'web3'.
@jeansouza Yes, there is a similar TS issue. I will fix and release it asap. I apologize for the troubles.
@nivida thank you very much! =]
The readme file got updated and explains the usage of the Web3.js lib in a commonjs environment.