Skip to content

[Bug] How to reduce Crepe bundle size? #1533

Closed
@sindras

Description

@sindras

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected packages and versions

Crepe

Link to runnable example

https://stackblitz.com/edit/github-gpc2xr

Steps to reproduce

To reproduce:

  1. Create a Vite-based React project.
  2. Create an editor with milkdown-crepe. Disable the CodeMirror.
  3. Try building the assets vite build, notice that all CodeMirror languages are still bundled in the output.

Expected behavior

The unused features should be dropped from final output. Or, create a more reasonable defaults by limiting the number of CodeMirror supported languages to popular ones such as HTML, CSS, JS, Python, C++, PHP, Java, SQL, etc instead of including Brainfuck?

Actual behavior

All language and CodeMirror specific code are still bundled together after running vite build, under the dist/assets folder.

Runtime

No response

OS

No response

Build and bundle tools

Remix

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions