lentschi / ngx-ellipsis

Multiline text with ellipsis for angular 9+
MIT License
96 stars 22 forks source link

Update to Angular 10 #42

Closed konuch closed 4 years ago

konuch commented 4 years ago

Hello, it would be great if this library was updated to support angular 10. Currently we are getting warnings:

\node_modules\ngx-ellipsis\__ivy_ngcc__\fesm2015\ngx-ellipsis.js depends on 'element-resize-detector'. 
CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Thanks for the hard work you've put into this library.

lentschi commented 4 years ago

Thanks for bringing this up & sorry for taking so long to react.

This was actually just a warning about optimization: https://angular.io/guide/build#configuring-commonjs-dependencies Angular 10 did work fine for me. (Though I did not invest much time to check how significant this optimization loss is, they're talking about)

In order to fix it, I had to switch from element-resize-detector to resize-observer-polyfill, which meant a breaking change -> In ngx-ellipsis@3.0.0 you should no longer see this warning and resize detection works differently internally.