-
-
Notifications
You must be signed in to change notification settings - Fork 277
Closed
Description
I've noticed that MDXEditor includes @codemirror/language-data as a dependency, which causes bundlers to generate 100+ lazy-loaded language chunks even when codeBlockPlugin and codeMirrorPlugin are not used. We are not using any of these feature as we just want basic formattting.
Impact:
- Before MDXEditor: 14 lazy chunks
- After MDXEditor: 150+ lazy chunks (python, sql, css, ruby, perl, etc.)
- Initial bundle only increased by ~10 kB, but deployment now has 136 extra files
Reproduction
My imports (no code plugins):
import {
MDXEditor,
headingsPlugin,
toolbarPlugin,
BlockTypeSelect,
} from '@mdxeditor/editor';
Build result:
chunk-CWTJBLNK.js | python | 6.53 kB
chunk-SMLDLULW.js | sql | 37.15 kB
chunk-5K5AGJRX.js | css | 27.25 kB
... (100+ more language files)
Would there be a way to not include those chunks if we don't use the code plugin ?
Thank you !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels