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

Memory Issues: Looking for lighter version of Botframework webchat

Open nareshkyady opened this issue 2 years ago • 2 comments

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

NPM

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Browser: Firefox (latest), Platform: macOS

Which area does this issue affect?

Others or unrelated

What is the public URL for the website?

No response

Please describe the bug

Hello Team

I am working on creating a front end plugin with backstage and building a webchat interface to connect to azure bot using createDirectLine, ReactWebChat, createStore functions in my code. For this I have included botframework-webchat npm package.

When I build this into docker image, pulls lot of dependency packages which may or may not be required. Eg. Cognitive services (I dont require).

I am looking for a lighter version of botframework-webchat with only functions available.

Please provide any information so I can use that lighter version of npm package to build my image.

Let me know if you have any.

Do you see any errors in console log?

The bundle size is significantly larger than recommended. before a 137 error.

How to reproduce the issue?

yarn build-image

What do you expect?

Provide a lighter version of botframework-webchat npm package

What actually happened?

Build image is broken.

Do you have any screenshots or recordings to repro the issue?

No

Adaptive Card JSON

No response

Additional context

No response

nareshkyady avatar Oct 09 '23 19:10 nareshkyady

@nareshkyady

Does the minimal sample not suit your needs?

dmvtech avatar Nov 02 '23 17:11 dmvtech

Hi @dmvtech for the React based bundling (install webchat npm install botframework-webchat and call createDirectLine, renderWebChat from react application, bundle application with webpack) how can we minimize the size? is there any sample to ignore / prune dependencies that we don't need (e.g. Cognitive Services) while packing React app via webpack/rollup?

slowtick avatar Nov 05 '23 04:11 slowtick

No, there are no such samples. The only way to minimize further is to build from the repository yourself and removing/building/testing to see if it works for you.

dmvtech avatar Jul 18 '24 21:07 dmvtech