twilio-client.js icon indicating copy to clipboard operation
twilio-client.js copied to clipboard

Remove CommonJS or AMD dependencies that can cause optimization bailouts

Open seth-church opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. While upgrading our application to angular 10, this appears in the console output during a build: WARNING in /path/services/twilio.service.ts depends on 'twilio-client'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Please upgrade the twilio-client so it doesn't have these dependencies.

seth-church avatar Dec 15 '20 23:12 seth-church

Thanks for bringing this up @seth-church, I'm not familiar with twilio.service.ts, is this something in your project? It seems like your project is complaining that twilio-client is CommonJS. You could point directly to the typescript, however we do still currently have a few CommonJS files that aren't yet converted to TypeScript. This is something that we will address as we finish converting the remaining files to TypeScript.

liberty-rowland avatar Aug 09 '21 15:08 liberty-rowland

Yes, /path/services/twilio.service.ts is one of our TypeScript files that imports Connection and Device from 'twilio-client'. If you can remove CommonJS dependencies, that would be great, thanks!

seth-church avatar Aug 09 '21 15:08 seth-church