microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.56k stars 1.51k forks source link

Memory Issues: Looking for lighter version of Botframework webchat #4897

Closed nareshkyady closed 1 week ago

nareshkyady commented 9 months ago

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

dmvtech commented 8 months ago

@nareshkyady

Does the minimal sample not suit your needs?

slowtick commented 8 months ago

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?

dmvtech commented 1 week ago

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.