webui icon indicating copy to clipboard operation
webui copied to clipboard

Get rid of CommonJS dependencies

Open manuelwedler opened this issue 5 years ago • 1 comments

Since Angular version 10 the Angular cli warns about used CommonJS dependencies, because they can cause larger bundle sizes. See https://angular.io/guide/build#configuring-commonjs-dependencies for reference.

The cli warnings are currently suppressed by the allowedCommonJsDependencies option: https://github.com/raiden-network/webui/blob/e091b8a49072cabeaf747bed046bb6a26f8e4a01/angular.json#L29-L50

We should try to only use ECMAScript modules in the future. Some dependencies like web3 are already working on providing an ES module.

manuelwedler avatar Jul 17 '20 15:07 manuelwedler

Using import { BigNumber } from 'bignumber.js/bignumber'; should fix it for bignumber.js, see https://github.com/MikeMcl/bignumber.js/issues/278

manuelwedler avatar Apr 19 '21 11:04 manuelwedler