Open jbakoc1 opened 3 years ago
It's the bignumber.mjs file.
See the package.json:
"module": "bignumber.mjs",
Did anyone found a solution how angular build finds the *.mjs
file? I have the same problem too.
@phip1611 The way I found was to rename the bignumber.mjs -> bignumber.js There is probably a better way that I don't know 😉
Same issue here, any update?
This is because in Angular you must add this for each CommonJS Dependency:
"options": { "allowedCommonJsDependencies": ["bignumber.js"] }
This is because in Angular you must add this for each CommonJS Dependency:
"options": { "allowedCommonJsDependencies": ["bignumber.js"] }
This option tells the compiler to ignore the warning. Not fixing the issue.
I'm not 100% sure why, but importing like that seems to solve the warning:
import { BigNumber } from 'bignumber.js/bignumber';
webpack-bundle-analyzer:
I confirm this. I changed my imports. Thanks @gabrielbiga
After upgrading to Angular version 10 I get the message depends on 'bignumber.js'. CommonJS or AMD dependencies can cause optimization bailouts. Are you going to publishing an ES module?