Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce bundle size #91

Open
michaelfester opened this issue Jul 7, 2023 · 2 comments
Open

Reduce bundle size #91

michaelfester opened this issue Jul 7, 2023 · 2 comments
Assignees

Comments

@michaelfester
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, @markprompt/web is quite big:

CleanShot 2023-07-06 at 22 12 25@2x

Describe the solution you'd like
We should check if there are low hanging fruits allowing us to reduce the bundle size.

@nickrttn
Copy link
Member

nickrttn commented Jul 9, 2023

Our unified toolchain for rendering the answer as well as @radix-ui/react-dialog are currently the biggest contributors to our bundle size.

  • We can look into replacing unified with markdown-to-jsx, which is a lot more lightweight. I tried once, but it appeared to mangle the HTML of the prompt answer while incomplete. There might be a setting I did not try so worth another look.
  • We could drop @radix-ui/react-dialog for the native <dialog /> element, which is supported in all major browsers. It would mean more custom code and maintenance on our end but it might be worth the payoff.

@nickrttn
Copy link
Member

https://github.com/KittyGiraudel/a11y-dialog/releases/tag/8.0.0 Another option for a more lightweight dialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants