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

Make react-markdown optional #5

Open
elboletaire opened this issue Mar 1, 2023 · 0 comments
Open

Make react-markdown optional #5

elboletaire opened this issue Mar 1, 2023 · 0 comments
Labels
chakra-components Things related to the chakra-components package enhancement New feature or request

Comments

@elboletaire
Copy link
Member

Right now react-markdown isn't optional. It needs to be installed as a different package in order to get a smaller bundle size.

What we should do is dynamically import react-markdown (and remark-gfm, a required plugin), only when markdown parsing is enabled (via some context setting). Doing it this way, the required react-markdown and remark-gfm packages will be only required when actually parsing markdown contents.

@elboletaire elboletaire added enhancement New feature or request chakra-components Things related to the chakra-components package labels Mar 1, 2023
elboletaire added a commit that referenced this issue May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chakra-components Things related to the chakra-components package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant