Currently this package cannot be processed correctly by ngcc (Angular's ivy compatibility compiler) because the package.json contains "module": "index.js" property. This means that applications targeting the ivy renderer in Angular 9 (the default) will not be able to use this library.
This property is supposed to be used for ES6 code (i.e. stuff that uses ES modules) but index.js contains CommonJS formatted code.
The "main" property, which also exists in the package.json is the correct one to use for index.js.
Could you remove the "module" property from the published package.json, or update the build to also generate ES6 as well and point this property at that file?
In the meantime projects using this package and targeting ivy can workaround the problem with an `ngcc.config.js file in their project root containing:
Currently this package cannot be processed correctly by ngcc (Angular's ivy compatibility compiler) because the package.json contains
"module": "index.js"
property. This means that applications targeting the ivy renderer in Angular 9 (the default) will not be able to use this library.This property is supposed to be used for ES6 code (i.e. stuff that uses ES modules) but
index.js
contains CommonJS formatted code.The
"main"
property, which also exists in thepackage.json
is the correct one to use forindex.js
.Could you remove the
"module"
property from the published package.json, or update the build to also generate ES6 as well and point this property at that file?In the meantime projects using this package and targeting ivy can workaround the problem with an `ngcc.config.js file in their project root containing: