BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Reducing botframework 4.7 footprint

Open ppatalong opened this issue 6 years ago • 2 comments

Hi I've rewritten our bot from 0.17 to 4.7.x, removed jquery & other stuff, just pure react. However, even in webpack production build (using terser plugin), our vendor bundle is ~3.7MB! This is twice the previous size.

Please see bundle analyzer image: https://imgur.com/a/WVU6lfn Is it possible to remove speech-sdk (if one is not using it), or any other way to reduce final size?

ppatalong avatar Jan 22 '20 09:01 ppatalong

Are you using the CDN or npm package? If CDN, you can consider using the minimal bundle to reduce package size. Take a look at our 01.getting-started/ minimal bundle sample.

As for npm, in the past we have seen users build their own Web Chat bundle in order to pick and choose the features they need, and remove the features they don't in order to reduce file size. You can start by taking a look at the WebChat/packages/bundle folder for more information.

corinagum avatar Jan 22 '20 18:01 corinagum

Thanks for answer, this will definitely help. We use npm approach.

ppatalong avatar Jan 24 '20 12:01 ppatalong