twilio-client.js
twilio-client.js copied to clipboard
Remove CommonJS or AMD dependencies that can cause optimization bailouts
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.
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.
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!