-
Notifications
You must be signed in to change notification settings - Fork 417
Closed
Description
Steps to reproduce:
- Use npm to install big.js in an Angular 10+ library.
- Import big.js into a file in the Angular library.
In this caseimport Big from 'big.js';,import { Big } from 'big.js';andimport * as Big from 'big.js';all behave the same. - Build the library.
- Install the library in an Angular 10+ project and build that project.
- Get the following error:
WARNING in <PROJECT_DIRECTORY>\node_modules\<PARENT_PACKAGE>\__ivy_ngcc__\<PACKAGE_NAME>\fesm2015\<PROJECT_NAME>.js depends on 'big.js'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
It seems that the big.js package provided by npm doesn't properly export its ES Module. Upon looking into the package, I do see big.mjs, but any attempt at doing something like import Big from 'big.js\big.mjs'; causes a compilation failure.
Metadata
Metadata
Assignees
Labels
No labels