Due to the build/publish single-file output rule, @lexical/code-shiki includes every Shiki import and causes the bundle to grow by 8-9 megabytes.
Lexical version: v0.44.0
Steps To Reproduce
- Install
@lexical/code-shiki
- import
@lexical/code-shiki somewhere
The current behavior
Shiki is wholly bundled in the main bundle (or Lexical's chunk if Lexical is lazy-loaded)
The expected behavior
Shiki is not bundled with the app;
CodeNode should source its code language and theme from Shiki on-demand (default Shiki behavior)
Impact of fix
Apps that use @lexical/code-shiki would be 8-9 megabytes lighter
Due to the build/publish single-file output rule,
@lexical/code-shikiincludes every Shiki import and causes the bundle to grow by 8-9 megabytes.Lexical version: v0.44.0
Steps To Reproduce
@lexical/code-shiki@lexical/code-shikisomewhereThe current behavior
Shiki is wholly bundled in the main bundle (or Lexical's chunk if Lexical is lazy-loaded)
The expected behavior
Shiki is not bundled with the app;
CodeNodeshould source its code language and theme from Shiki on-demand (default Shiki behavior)Impact of fix
Apps that use
@lexical/code-shikiwould be 8-9 megabytes lighter