You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, react-code-blocks is very nice! However, it would be useful if there was a way to only load the required languages, as currently the bundle is very large and in most cases will be loading many more languages than the client likely needs.
The text was updated successfully, but these errors were encountered:
Hey @jacobedawson, that's an interesting point you bring up. Currently, the languages are called using the PrismAsyncLight component offered by react-syntax-highlighter which should optimize the build size.
But the availability of languages might be a reason for the large package size.
Perhaps we can split the packages into a light version that would require the language to be a peer dependency?
Yeah, I'm using react-syntax-highlighter and I'm able to require only the languages that I need, I think it makes sense since there are a lot of language files that will never be used.
I second the request for a 'light' version with a way to select only the languages needed. I wanted a quick option for some JS highlighting and while the display looks great, my chunked build went from 10 files to 310.
Hi, react-code-blocks is very nice! However, it would be useful if there was a way to only load the required languages, as currently the bundle is very large and in most cases will be loading many more languages than the client likely needs.
The text was updated successfully, but these errors were encountered: