nicfv / npm

nicfv's public NPM packages in one repository
https://npm.nicfv.com/
MIT License
0 stars 0 forks source link

ESM module support #120

Open shollander opened 1 week ago

shollander commented 1 week ago

When using viridis within an Angular project, I get a warning when compiling angular:

▲ [WARNING] Module 'viridis' used by './my.component.ts' is not ESM

  CommonJS or AMD dependencies can cause optimization bailouts.
  For more information see: https://angular.io/guide/build#configuring-commonjs-dependencies

Please package viridis as ESM.

nicfv commented 1 week ago

Hi @shollander and thanks for reporting this. I'll take a look into it, I believe it would be a simple fix in tsconfig but I want to run some tests and make sure the installation docs are updated before committing anything. In the mean time, I'd recommend following the instructions to enable CommonJS modules, from the link in the warning you sent.