Is the angular-material package dependency on hammerjs still needed?

I didn’t want to open this as a “bug report” as such, but can file an issue if that’s appropriate.

When building a modern Angular application using the Angular Material JSONForms package, a warning is shown because it imports the hammerjs library – the bundler complains because the package is CJS-only. On investigation, it looks like this package hasn’t been updated in a decade, and many of the browser shortcomings it aimed to address are now implemented directly in the DOM.

As far as I can tell the package is imported once at the top of angular-material/src/library/index.ts and none of its helpers are directly used in the rest of the codebase. If I’m missing something please let me know, but otherwise it seems like this import (and the package dependency) could probably be safely removed.

Hi @thw0rted ,
thanks for bringing this up. I agree that we should remove this dependency if we can do it without (greater) regressions.
I think it might have been introduced to support the deprecated HammerModule

Could you open an issue, please?

Thanks and best regards,
Lucas

1 Like

Done! GitHub · Where software is built

1 Like

@thw0rted Thank you :slight_smile: