Skip to content

Option to reduce bundle size by removing some languages from "Code Block" feature? #1213

Closed
@sindras

Description

@sindras

Is your feature request related to a problem? Please describe.

Follow-up from #1177, is there a way to reduce bundle size by opting out from some languages?
Even though the languages have been filtered out as per discussion in the PR, they are still bundled in the production assets.
Screenshot attached below.

Also there does not seem to be any documentation about configuring the code block in the docs website.

Describe the solution you'd like

  1. Provide the option to configure the Code Block, especially supported languages.
  2. Tree-shake the unused languages.
  3. Update the documentation to include an example of configuring the Code Block.

Additional context

This is generated by running npm run build with Remix framework.

Screenshot 2024-11-03 at 8 34 54 PM

Bonus

I am willing to help if someone can point me in the right direction regarding the tree-shaking.
Thank you so much for creating BlockNote! ❤️

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions