Closed r0bertz closed 4 years ago
Please hold on. I just realized there are more APIs to fix.
Done. PTAL.
Please hold on. I just learned that this doesn't work for all packages:
resolve: { mainFields: ['browser', 'module', 'main'] }
For ws 6.0.0 upwards, browser is just a dummy file which does nothing but raises an error. I will change the way that bignumber.js is imported.
Never mind. Just go ahead and merge this. This is independent of what I am going to do.
See https://github.com/MikeMcl/bignumber.js/blob/master/CHANGELOG.md#600
A little background:
I didn't really make it work when I bumped the version of bignumber.js. I bumped it because I thought the problem I saw was caused by bignumber.js discrepancy.
It turned out the problem I had was require('bignumber.js') doesn't work for es6 module 'bignumber.mjs'. I worked around it. Then I started seeing the API incompatibility issue. Hence this PR.