We where going to add Microsoft Omnichannel to our webpage but we discovered that running it, a small chat widget takes up a staggering 6MB of pure javascript code.<p>Anyone known what is going on?<p>See this example from microsoft.net: https://csimplreslivechatsamples.blob.core.windows.net/$web/AddCustomHeaderButton.html<p>And the results here:
https://i.imgur.com/I77JvjO.png
It seems to me that widget.js file (<a href="https://lcwstorageaccountdev.blob.core.windows.net/charlwan/livechatwidget/v2scripts/widget.js" rel="nofollow">https://lcwstorageaccountdev.blob.core.windows.net/charlwan/...</a>) contains everything from localizations to React stuff to their Fluent UI framework to crypto stuff in one massive bundle, and it's not fully minimized or served compressed. I'm not sure why they would serve it like that, but it does seem a little crazy.<p>However, they do offer the ability to build your own omnichannel UI using their React components (<a href="https://github.com/microsoft/omnichannel-chat-widget">https://github.com/microsoft/omnichannel-chat-widget</a>), and from their storybook (<a href="https://microsoft.github.io/omnichannel-chat-widget/docs/storybook/?path=/story/stateful-components-live-chat-widget--default-with-survey" rel="nofollow">https://microsoft.github.io/omnichannel-chat-widget/docs/sto...</a>) those file sizes look smaller, even with the Storybook code included. Or you can build your own from their SDK (<a href="https://github.com/microsoft/omnichannel-chat-sdk">https://github.com/microsoft/omnichannel-chat-sdk</a>).<p>Maybe with some good tree-shaking, dynamic lazy-loading of imports, and good serverside compression with gzip/brotli, it miiiiiiight get small enough to be serviceable? It's still a lot of bloat... but if you need all those features and don't mind slowing everything down for your customers...<p>I'd probably just put my own little popup chat icon in the lower right and use that to dynamically load the rest of the script, only for those who really want to start a chat. That way, at least you don't force the entire bundle on every website visitor.
Microsoft really is the king of bloat.<p>I've implemented their Clarity analytics before and its the heaviest analytics integration I've dealt with by far.<p>I don't know what kind of paint thinner they're sniffing over there in Redmond, but its potent stuff.