'\n\n html.value = await codeToHtml(code, {\n lang: 'vue',\n theme: 'material-theme-ocean',\n })\n})\n\u003C/script>\n\n\u003Ctemplate>\n \u003Cdiv v-html=\"html\">\u003C/div>\n\u003C/template>\n```\n5. Put this code into a `.md` file:\n```md\n---\nlayout: page\nsidebar: false\n---\n\n\u003Cscript setup>\nimport CustomComponent from './CustomComponent.vue'\n\u003C/script>\n\n\u003CCustomComponent />\n```\n5. `pnpm build && pnpm docs:build`\n6. `pnpm preview`\n - Open the page where the Shiki is used.\n - Open DevTools → Network tab.\n - Notice that only the Vue grammar and material-theme-ocean chunks are fetched. This is correct. ✅\n7. `pnpm docs:preview`\n- Open the page where the Shiki is used.\n- Open DevTools → Network tab.\n- Notice that all Shiki languages and themes (even those not in use) are fetched at page load. This is incorrect. ❌\n\n### Expected behavior\n\nWhen building VitePress production site with `pnpm docs:build`, the output should behave like a standard Vue production build (`pnpm build`) when using libraries such as Shiki: the production page should not fetch every chunk up front at page load; it should only fetch the chunks when they are needed.\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 11 10.0.26100\n CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H\n Memory: 33.51 GB / 63.67 GB\n Binaries:\n Node: 22.11.0 - C:\\Program Files\\nodejs\\node.EXE\n Yarn: 1.22.22 - ~\\AppData\\Roaming\\npm\\yarn.CMD\n npm: 11.4.1 - C:\\Program Files\\nodejs\\npm.CMD\n pnpm: 10.11.0 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\n Browsers:\n Edge: Chromium (130.0.2849.80)\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\n```\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [x] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [x] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [x] Read the [docs](https://vitepress.dev).\n- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3085],{"name":3055,"color":3056},4770,"VitePress build eagerly loads all Shiki chunks instead of lazy-loading only what's needed","2025-06-03T04:11:18Z","https://github.com/vuejs/vitepress/issues/4770",0.7268768,{"description":3092,"labels":3093,"number":3094,"owner":3024,"repository":3025,"state":3046,"title":3095,"updated_at":3096,"url":3097,"score":3098},"### Is your feature request related to a problem? Please describe.\r\n\r\nMake configuration easier.\r\n\r\n### Describe the solution you'd like\r\n\r\nSame as [vite](https://vitejs.dev/config/#config-intellisense) :\r\n\r\n```ts\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n lang: 'en-US',\r\n // ...\r\n}) \r\n``` \r\n\r\nBut we need to improve the support for theme config:\r\n\r\nBy default, `defineConfig` helper leverages the theme config type from default theme:\r\n\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n themeConfig: {\r\n // Type is `DefaultTheme.Config` \r\n }\r\n})\r\n```\r\n\r\nIf you use a custom theme, you'll be able to pass the generics type for your custom theme, and you need overload it with the second parameter of `defineConfig` helper:\r\n\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\nimport { ThemeConfig } from 'your-theme'\r\n\r\nexport default defineConfig\u003CThemeConfig>({\r\n themeConfig: {\r\n // Type is `ThemeConfig` \r\n }\r\n}, true); // declare `usingCustomTheme` and discard usage of the default theme.\r\n```\r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\r\n- [X] Read the [docs](https://vitepress.vuejs.org/).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],464,"[Feature Request] Improve TypeScript support for config file.","2023-01-21T16:20:21Z","https://github.com/vuejs/vitepress/issues/464",0.72722554,{"description":3100,"labels":3101,"number":3103,"owner":3024,"repository":3025,"state":3046,"title":3104,"updated_at":3105,"url":3106,"score":3107},"### Is your feature request related to a problem? Please describe.\n\nAlthough C# is one of the available languages it does not recognize cs extension while trying to use \u003C\u003C\u003C to import code.\r\n\r\n```bash\r\n[vite] Internal server error: No language registration for cs\r\n```\n\n### Describe the solution you'd like\n\nI'm not sure how it work internally but it seems in only missing the recognition of cs files as C# language!\n\n### Describe alternatives you've considered\n\nIf it can be done by default great.\r\nIf this needs an configuration maybe updating the docs would suffice.\r\n\n\n### Additional context\n\nI have support for other languages would improve the usage (and popularity) of vitepress 🤓 \n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[3102],{"name":3066,"color":3067},861,"Add support for cs files! Yes I do use vitepress to document C# libraries 😁","2023-01-21T14:25:28Z","https://github.com/vuejs/vitepress/issues/861",0.73029554,{"description":3109,"labels":3110,"number":3111,"owner":3024,"repository":3025,"state":3046,"title":3112,"updated_at":3113,"url":3114,"score":3115},"### Is your feature request related to a problem? Please describe.\n\nMy request is related to the problem of limited access to VitePress documentation for Chinese developers.\n\n### Describe the solution you'd like\n\nDear VitePress team,\r\n\r\nI am writing to express my interest in translating your excellent documentation from English into Simplified Chinese. As an avid user of VitePress, I believe having Chinese documentation would greatly benefit the Chinese developer community, who may not be proficient in English.\r\n\r\nVitePress has quickly become one of the most popular static site generators thanks to its focus on speed and flexibility. However, currently all the official resources are only available in English. This creates a barrier to adoption for millions of developers in China who could greatly benefit from VitePress.\r\n\r\nAs a native Chinese speaker proficient in English, I would be honored to volunteer my time to translate the VitePress docs and site into Simplified Chinese. This would involve translating the documentation, guides, API references, and anything else on the site.\r\n\r\nI am part of the Chinese open source community and am committed to helping projects expand their reach. I would handle all the translation work, while making sure to maintain the original meaning and technical accuracy. I am also happy to coordinate with your team and demonstrate proficiency if required.\r\n\r\nPlease consider this request to translate VitePress into Chinese. I believe it will significantly lower the barrier to entry for Chinese developers and enable faster adoption in China. If you have any other questions or need clarification, please let me know. I am excited at the possibility of contributing to this great project!\r\n\r\nThank you for your consideration.\n\n### Describe alternatives you've considered\n\n_No response_\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],2883,"Request to Translate VitePress Documentation into Simplified Chinese","2023-09-07T00:04:19Z","https://github.com/vuejs/vitepress/issues/2883",0.7320047,["Reactive",3117],{},["Set"],["ShallowReactive",3120],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fM-NU-mdQi1OdZLI0CiGfo2LVqAQozviGPzkWmBy6PGM":-1},"/vuejs/vitepress/1533"]