facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
18.5k stars 1.55k forks source link

Bug: prismjs is included as a dependency of @lexical/markdown #5381

Open markulrich opened 7 months ago

markulrich commented 7 months ago

It appears that prismjs gets included as a (very large) dependency of @lexical/markdown, swelling the bundle size.

Steps To Reproduce

See https://bundlephobia.com/package/@lexical/markdown@0.12.5 and that prismjs swells the bundle size

The current behavior

Prismjs is included in the bundle

The expected behavior

Prismjs is not included, and the bundle size is <100kb

markulrich commented 7 months ago

Also see note from @acywatson at https://github.com/facebook/lexical/discussions/3778#discussioncomment-6694006. Thank you!!

vadimkantorov commented 7 months ago

Btw, just curious, what is the expected ls node_modules | wc -l and du -sh node_modules | tail -n 1 after npm install of a freshly-cloned https://github.com/facebook/lexical ?

For me this initial npm install led to more than 1000...