Hammer.js: Using HammerJS on Angular 10 project is giving warning to avoid it for optimization

Created on 2 Jul 2020  路  3Comments  路  Source: hammerjs/hammer.js

WARNING in E:\Projects\MISL\e-kyc\src\main.ts depends on hammerjs. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

So, I think we need some ECMA module for HammerJS to implement it as optimized in Angular. Does HammerJS has some module like this?

All 3 comments

I agree and wish for ES modules version

In the meantime you can add hammer js in angular.json

"build": { .... "allowedCommonJsDependencies": [ "hammerjs", .... ] },

@maranmaran, it will just stop the warning, right?

@Shofol yes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

priyankaviswan picture priyankaviswan  路  5Comments

Loginstudio picture Loginstudio  路  3Comments

anselmh picture anselmh  路  10Comments

PatreekH picture PatreekH  路  5Comments

julmot picture julmot  路  9Comments