Create an editor with milkdown-crepe. Disable the CodeMirror.
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.
I would love to know how to tree-shake out all those unused languages. Even when I supply an explicit list, the full set ends up in my bundle. I think it could be caused by this dynamic import
Initial checklist
Affected packages and versions
Crepe
Link to runnable example
https://stackblitz.com/edit/github-gpc2xr
Steps to reproduce
To reproduce:
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 thedist/assets
folder.Runtime
No response
OS
No response
Build and bundle tools
Remix