x component depends on 'lodash'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
This is how i use lodash in my x component.ts
import * as _ from 'lodash';
....
....
foo(){
this.myObject = _.mapValues(this.myObject , () => true);
}
How do I get rid of this warning?
Instead of using the CommonJS variant of lodash, you could use lodash-es (ES modulized).