nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.13k stars 627 forks source link

Support different bundles for shiki to reduce bundle size #2821

Open itpropro opened 3 weeks ago

itpropro commented 3 weeks ago

Currently, shiki adds quite a lot of overhead to the client bundle when highlighting is used somewhere in the application (MDC or Nuxt UI components for example). It would help to support different bundles, maybe even fine grained bundles to be able to control the bundle size. It could even be possible to automatically generate a fine grained bundle by storing the referenced langs from the content pages and creating dynamic imports only for the languages used in content files and/or global configuration.