\r\n\r\n@antd-templater/library-3.x 报错代码的文件部分代码\r\n```typescript\r\nimport { defineComponent, ref, onMounted, createVNode, mergeProps } from 'vue';\r\nimport ATooltip from 'ant-design-vue/es/tooltip';\r\nimport * as VueTypes from 'vue-types';\r\n\r\nconst SEllipsis = /* @__PURE__ */ defineComponent({\r\n // ....\r\n})\r\n```\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-kzz2up?file=docs%2F.vitepress%2Ftheme%2Findex.ts\r\n\r\n### Expected behavior\r\n\r\n希望可以正常构建\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 18.18.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 10.2.3 - /usr/local/bin/npm\r\n pnpm: 8.15.6 - /usr/local/bin/pnpm\r\n npmPackages:\r\n vitepress: latest => 1.1.4\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\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.",[],3872,"Error: [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import ...","2024-05-16T04:42:04Z","https://github.com/vuejs/vitepress/issues/3872",0.74163204,{"description":2923,"labels":2924,"number":2928,"owner":2869,"repository":2870,"state":2909,"title":2929,"updated_at":2930,"url":2931,"score":2932},"### Describe the bug\n\n1. see https://github.com/docschina/vue-tips-weekly/blob/main/posts/070.md . the file front-matter set head link \r\n2. clone, install, build\r\n3. see view-source:https://vue-tips-weekly.vercel.app/070.html , the rendered source html file not have head link \r\n4. visit https://vue-tips-weekly.vercel.app/070.html in browser, have the head link\n\n### Reproduction\n\n- source https://github.com/docschina/vue-tips-weekly/blob/main/posts/070.md\r\n- site https://vue-tips-weekly.vercel.app/070.html \n\n### Expected behavior\n\nrendered source html file have head link\n\n### System Info\n\n```shell\n\"vitepress\": \"^1.0.0-alpha.4\",\n```\n\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2925],{"name":2926,"color":2927},"bug: pending triage","e99695",1069,"md set formatter head tag but rendered html not have head tag","2023-01-21T14:30:07Z","https://github.com/vuejs/vitepress/issues/1069",0.7453207,{"description":2934,"labels":2935,"number":2937,"owner":2869,"repository":2870,"state":2909,"title":2938,"updated_at":2939,"url":2940,"score":2941},"### Describe the bug\n\nsorry for disturbing, there is one tiny writing error in docs/guide/extending-default-theme.md:121\r\n\r\nDesctructed property `app` should have been used, but `ctx.app` was used instead.\r\n\r\n```ts\r\n async enhanceApp({ app }) {\r\n // register your custom global components\r\n ctx.app.component('MyGlobalComponent' /* ... */)\r\n }\r\n```\r\n\r\n\r\n\r\n\n\n### Reproduction\n\nNone\n\n### Expected behavior\n\nNone\n\n### System Info\n\n```Text\nNone\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.",[2936],{"name":2892,"color":2893},3184,"tiny flaw in docs/guide/extending-default-theme.md","2023-11-13T00:04:42Z","https://github.com/vuejs/vitepress/issues/3184",0.7476341,{"description":2943,"labels":2944,"number":2945,"owner":2869,"repository":2870,"state":2909,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Describe the bug\n\nI added two \u003Cscript> to the head configuration that I wanted to execute once per page opened, they worked fine in the development environment, but after packaging and deploying to GitHub Pages, they only executed when the browser was refreshed.\r\n\r\n```\r\n // 百度统计代码:https://tongji.baidu.com\r\n ['script', {}, `var _hmt = _hmt || [];\r\n (function() {\r\n var hm = document.createElement(\"script\");\r\n hm.src = \"https://hm.baidu.com/hm.js?xxxxxxxxxx\";\r\n var s = document.getElementsByTagName(\"script\")[0]; \r\n s.parentNode.insertBefore(hm, s);\r\n })();`],\r\n // 页面访问量统计\r\n ['script', {}, `var pageUrl = location.href;\r\n (function() {\r\n xhr = new XMLHttpRequest();\r\n xhr.open('GET', 'https://xxxxxxxxxx/pv?pageUrl=' + pageUrl + \"&t=\" + new Date().getTime());\r\n xhr.send();\r\n })();`]\r\n```\n\n### Reproduction\n\nN/A\n\n### Expected behavior\n\nN/A\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics\r\n Memory: 7.05 GB / 13.87 GB\r\n Binaries:\r\n Node: 16.17.1 - D:\\Develop\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.15.0 - D:\\Develop\\nodejs\\npm.CMD\r\n Browsers:\r\n Internet Explorer: 11.0.19041.1566\n```\n\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],1643,"The head configuration, when packaged and deployed to GitHub Pages, did not have the desired effect","2023-01-21T14:20:31Z","https://github.com/vuejs/vitepress/issues/1643",0.7497389,{"description":2951,"labels":2952,"number":2953,"owner":2869,"repository":2870,"state":2909,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Is your feature request related to a problem? Please describe.\r\n\r\nSometimes there is no way to add headers to VitePress config, for example, when using `vite-plugin-pwa` we need to add the webmanifest link to the head, but, since the plugin will not generate it in dev mode, we'll have errors if we register it in the config file.\r\n\r\nAnother asset is the one for registering the service worker: `vite-plugin-pwa` will allow the user registering using an inlined script or generating a new asset (`registerSW.js`). This script can be also omited, if the user import one of the virtual modules provided also by the plugin:\r\n\r\n```html\r\n\u003Cscript>\r\nif('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/sw.js', { scope: '/' })})}\r\n\u003C/script>\r\n```\r\nor\r\n\r\n```html\r\n\u003Cscript src=\"/registerSW.js\">\u003C/script>\r\n```\r\n\r\nIn both cases, if the pwa plugin needs to generate it is known in the `load` pwa main plugin hook (importing the virtual: https://github.com/antfu/vite-plugin-pwa/blob/main/src/plugins/main.ts#L36).\r\n\r\n### Describe the solution you'd like\r\n\r\nAdd a new build hook similar to `transformHtml`.\r\n\r\n### Describe alternatives you've considered\r\n\r\nWrite custom scripts to modify all pages: you can check it in the following repos:\r\n- Vite Plugin PWA: https://github.com/antfu/vite-plugin-pwa/blob/main/docs/scripts/assets.ts#L46\r\n- Vitest: https://github.com/vitest-dev/vitest/blob/main/docs/.vitepress/scripts/assets.ts#L56\r\n\r\nThe main problem with this approach is that VitePress runtime will have an hydration error, since we're modifying the html files.\r\n\r\n### Additional context\r\n\r\nI'll provide a PR for it, adding the logic in the `render.ts` module (like `transformHtml` build hook).\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.vuejs.org).\r\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],1322,"allow modify head before SSG rendering","2023-01-21T14:25:34Z","https://github.com/vuejs/vitepress/issues/1322",0.75282604,{"description":2959,"labels":2960,"number":2962,"owner":2869,"repository":2870,"state":2909,"title":2963,"updated_at":2964,"url":2965,"score":2966},"### Is your feature request related to a problem? Please describe.\n\nAs a user, I want to use the `VPFeatures` component on any page at any location I want, as it is a very useful as well as highly encapsulated component. However, currently only `VPHomeFeatures` is exposed, which is only a thin wrapper around `VPFeatures` that just ensures frontmatter is used for parametrization. This prevents using this otherwise standalone component freely.\n\n### Describe the solution you'd like\n\nAdd `VPFeatures` to `vitepress/theme.d.ts` e.g. by modifying either `src/client/theme-default/index.ts` or `src/client/theme-default/without-fonts.ts`.\n\n### Describe alternatives you've considered\n\nTrying to use only the related classes does not work due to the scoped styles. Other ideas have failed, similar to the issues described in #2595.\r\n\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.",[2961],{"name":2866,"color":2867},4355,"Expose VPFeatures","2025-01-17T04:43:46Z","https://github.com/vuejs/vitepress/issues/4355",0.7572619,["Reactive",2968],{},["Set"],["ShallowReactive",2971],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fJP_87Csu1JPKy1AGm2WuGxg-7VjqE10hz4nPEg0lCXA":-1},"/vuejs/vitepress/538"]