\r\n \u003CEmpty />\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript lang=\"ts\" setup>\r\nimport { Empty } from 'ant-design-vue';\r\nimport { ref } from \"vue\"\r\nconst visible = ref(true)\r\n\r\nconst handleClick = () => {\r\n visible.value = !visible.value\r\n\r\n}\r\n\u003C/script>\r\n\r\n```\r\n\n\n### Reproduction\n\n# Steps\r\n1. build. \r\nvitepress build docs.\r\n2. serve.\r\nvitepress serve docs. \r\n3. Click Button in the page.\r\n\r\n\r\n# Problem I face \r\nEverything is normal at the first.But when I click the button to change the element in the page, 'Empty' component cannot be rendered.\r\n\u003Cimg width=\"1672\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/43191187/00a0982a-5c11-47bc-adad-8e887380493a\">\r\n\n\n### Expected behavior\n\n# Expected. \r\nNo matter re-render times, I hope it can be rendered normal.\r\n\r\n\u003Cimg width=\"1676\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/43191187/74275c38-190d-49b5-a53a-4f23e2d123c7\">\r\n\n\n### System Info\n\n```Text\nThere's no any extra info.\n```\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.",[2913],{"name":2914,"color":2915},"bug: pending triage","e99695",3718,"closed","ant-design-vue some components cannot render twice under vitepress build.","2024-04-28T12:25:19Z","https://github.com/vuejs/vitepress/issues/3718",0.79800636,{"description":2923,"labels":2924,"number":2930,"owner":2872,"repository":2873,"state":2917,"title":2931,"updated_at":2932,"url":2933,"score":2934},"### Describe the bug\r\n\r\nI am trying to use vite [alias overwrite component](https://vitepress.dev/guide/extending-default-theme#overriding-internal-components). Such as `VPNavbar`. Works fine in the page display\r\n\r\nBut after building I found that the `dist/assets/style.css` file still retains the styles in the component that origin component style.\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-vfhomn?file=docs%2F.vitepress%2Fconfig.ts\r\n\r\n`npm run build` and check style file `dist/assets/style.css`\r\n\r\n\u003Cimg width=\"1624\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/40693636/85469507-fa9b-4e8f-b76a-a2ee2fc86bbb\">\r\n\r\n\r\n### Expected behavior\r\n\r\nRemove origin component's style\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 115.05 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.20.1 - /opt/homebrew/opt/node@16/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 8.19.4 - /opt/homebrew/opt/node@16/bin/npm\r\n Browsers:\r\n Chrome: 116.0.5845.179\r\n Safari: 16.5.2\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nI'm not sure if this is a bug or the vite alias design, but it's look like not a perfect overwrite. I want to get a css asset as small as possible.\r\n\r\nIf there is a configuration that can be removed, welcome share with me. 🙌\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2925,2926,2929],{"name":2914,"color":2915},{"name":2927,"color":2928},"has-workaround","1B4515",{"name":2869,"color":2870},2945,"Vite alias overwrite component. The origin component css save in bundler assert.","2024-05-05T04:41:48Z","https://github.com/vuejs/vitepress/issues/2945",0.80027753,{"description":2936,"labels":2937,"number":2940,"owner":2872,"repository":2873,"state":2917,"title":2941,"updated_at":2942,"url":2943,"score":2944},"### Is your feature request related to a problem? Please describe.\n\nWithout auto-wrap, I have to drag horizontally to view the text in the code block, which is a pain in the ass!\n\n### Describe the solution you'd like\n\n...\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.",[2938,2939],{"name":2883,"color":2884},{"name":2869,"color":2870},3307,"How to set auto-warp column in code blocks like docusaurus?","2024-02-23T00:05:11Z","https://github.com/vuejs/vitepress/issues/3307",0.8063068,{"description":2946,"labels":2947,"number":2948,"owner":2872,"repository":2873,"state":2917,"title":2949,"updated_at":2950,"url":2951,"score":2952},"### Is your feature request related to a problem? Please describe.\n\nI don't know if there's an already existing solution, but I try to rename a file according to the parent's folder\n\n### Describe the solution you'd like\n\nHere is an example:\r\n`/foo/bar/bar.md -> /foo/bar/index.md`\n\n### Describe alternatives you've considered\n\nI tried to create rewrite rules, something like that:\r\n`\":dir/:dir.md\": \":dir/index.md\"`\r\n\r\nBut it's not working\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.",[],3453,"Rename file that match parent folder name","2024-01-23T00:04:55Z","https://github.com/vuejs/vitepress/issues/3453",0.80885446,{"description":2954,"labels":2955,"number":2960,"owner":2872,"repository":2873,"state":2917,"title":2961,"updated_at":2962,"url":2963,"score":2964},"### Is your feature request related to a problem? Please describe.\n\nFind myself wanting to use VPButton and VPSponsors on a few places throughout my site. Right now, I exported them through a patch, but would great if they were exported by default.\n\n### Describe the solution you'd like\n\nVPButton and VPSponsors exported.\n\n### Describe alternatives you've considered\n\nCurrently use the following patch:\r\n\r\n```diff\r\ndiff --git a/dist/client/theme-default/without-fonts.js b/dist/client/theme-default/without-fonts.js\r\nindex 2b760aa398b7ac1881551ab146d7d308ef2277a3..a2940ca0b99b7673d8914e4bf332f57c588e8f46 100644\r\n--- a/dist/client/theme-default/without-fonts.js\r\n+++ b/dist/client/theme-default/without-fonts.js\r\n@@ -11,10 +11,12 @@ import Layout from './Layout.vue';\r\n // Note: if we add more optional components here, i.e. components that are not\r\n // used in the theme by default unless the user imports them, make sure to update\r\n // the `lazyDefaultThemeComponentsRE` regex in src/node/build/bundle.ts.\r\n+export { default as VPButton } from './components/VPButton.vue';\r\n export { default as VPHomeHero } from './components/VPHomeHero.vue';\r\n export { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\r\n export { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\r\n export { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\r\n+export { default as VPSponsors } from './components/VPSponsors.vue';\r\n export { default as VPTeamPage } from './components/VPTeamPage.vue';\r\n export { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\r\n export { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\r\ndiff --git a/theme.d.ts b/theme.d.ts\r\nindex 4b1076b5fbda893eb6f4a5df6a40c15d1bb379ba..177f5a6aa9602e0eeae954137bcce1ac0080ddef 100644\r\n--- a/theme.d.ts\r\n+++ b/theme.d.ts\r\n@@ -3,10 +3,12 @@ import type { DefineComponent } from 'vue'\r\n import { EnhanceAppContext } from './dist/client/index.js'\r\n \r\n // TODO: add props for these\r\n+export const VPButton: DefineComponent\r\n export const VPHomeHero: DefineComponent\r\n export const VPHomeFeatures: DefineComponent\r\n export const VPHomeSponsors: DefineComponent\r\n export const VPDocAsideSponsors: DefineComponent\r\n+export const VPSponsors: DefineComponent\r\n export const VPTeamPage: DefineComponent\r\n export const VPTeamPageTitle: DefineComponent\r\n export const VPTeamPageSection: DefineComponent\r\n```\n\n### Additional context\n\nHappy to open a PR for this!\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.",[2956,2957],{"name":2883,"color":2884},{"name":2958,"color":2959},"contribution welcome","11E4B8",2765,"Export VPButton + VPSponsors","2023-08-23T00:04:06Z","https://github.com/vuejs/vitepress/issues/2765",0.8172537,{"description":2966,"labels":2967,"number":2971,"owner":2872,"repository":2873,"state":2917,"title":2972,"updated_at":2973,"url":2974,"score":2975},"### Is your feature request related to a problem? Please describe.\n\n如果代码块中的代码特别长特别多的时候有时候想高亮一大片就特别麻烦,需要每行都写`[!code ++]` 或者`[!code --]`标记\n\n\n现在的方式:\n````\n ```js\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n foo // [!code ++]\n bar // [!code ++]\n bar // [!code ++]\n bar // [!code ++]\n bar // [!code ++]\n bar // [!code ++]\n ```\n````\n\n希望的方式\n````\n ```js\n foo // [!code ++:start]\n foo \n foo \n foo \n foo \n foo \n foo \n foo \n foo \n bar \n bar \n bar \n bar \n bar // [!code ++:end]\n ```\n````\n\n\n\n为什么会有这个想法是因为这是从实际的文档维护中遇到的麻烦的地方,并不是我无端的想法,希望可以把这个特性内置到vitepress中\n\n\n\n### Describe the solution you'd like\n\n这里有一个解决方案\n也是我之前提出的问题[#4602](https://github.com/vuejs/vitepress/issues/4602),根据答案进行的演化\n```js\nimport { defineConfig } from 'vitepress'\n\nexport default defineConfig({\n markdown: {\n codeTransformers: [\n {\n span(span, i, j, line) {\n if (\n !['js', 'javascript', 'ts', 'typescript'].includes(\n this.options.lang,\n )\n ) {\n return\n }\n\n const text = span.children[0]\n if (!text || text.type !== 'text') return\n\n const startMarker = '[!code ++:start]'\n const endMarker = '[!code ++:end]'\n const markers = [startMarker, endMarker]\n\n if (markers.some((marker) => text.value.includes(marker))) {\n this.addClassToHast(this.pre, 'has-diff')\n this.addClassToHast(line, ['diff', 'add'])\n }\n if (text.value.includes(startMarker)) {\n text.value = text.value.slice(0, -20)\n this.insideHighlightBlock = true // 标记高亮开始\n } else if (text.value.includes(endMarker)) {\n text.value = text.value.slice(0, -20)\n this.insideHighlightBlock = false // 标记高亮结束\n }\n },\n\n line(line, i) {\n if (this.insideHighlightBlock) {\n // 从开始标记开始高亮\n this.addClassToHast(line, ['diff', 'add'])\n }\n },\n }\n ]\n }\n})\n```\n\n上面的代码考虑的还是不够周全,但是想法和简单实现已经给出,如果觉得可行,请内置到viterepss中\n\n\n\n\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.",[2968],{"name":2969,"color":2970},"upstream","BF29ED",4613,"代码块差异效果支持开始和结束行的使用方式","2025-03-17T04:44:41Z","https://github.com/vuejs/vitepress/issues/4613",0.8211331,["Reactive",2977],{},["Set"],["ShallowReactive",2980],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f-mmM7QVaAwmJ9l8znc5nt4tSYJ115ZFFUoR2fZfpkEY":-1},"/vuejs/vitepress/4256"]