lephyrus / ngx-translate-messageformat-compiler

Advanced pluralization (and more) for ngx-translate, using standard ICU syntax which is compiled with the help of messageformat.js.
MIT License
93 stars 29 forks source link

@messageformat/core is CommonJS #93

Closed giacomo closed 1 year ago

giacomo commented 1 year ago

First of all thanks for your update, but the following message remains:

Warning: /usr/src/app/node_modules/ngx-translate-messageformat-compiler/fesm2020/ngx-translate-messageformat-compiler.mjs depends on '@messageformat/core'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Is there any way to get away from the warning, without adding allowedCommonJsDependencies?

anschm commented 1 year ago

It seems that this is now a problem in combination with angular 15.

./node_modules/ngx-translate-messageformat-compiler/fesm2020/ngx-translate-messageformat-compiler.mjs:4:0-48 - Error: Module not found: Error: Can't resolve '@messageformat/core' in '/Users/xxxxx/Projekte/xxxxx/Repositories/xxxxx/node_modules/ngx-translate-messageformat-compiler/fesm2020'

This lib is not compatible with angular 15.

lephyrus commented 1 year ago

Is there any way to get away from the warning, without adding allowedCommonJsDependencies?

@giacomo I don't think there's another way. The module format in which @messageformat/core is published is not under my control.

It seems that this is now a problem in combination with angular 15.

@anschm Works for me without any issues in a clean Angular 15 project, so it doesn't seem to be broken in general.