\r\n );\r\n },\r\n});\r\n\r\n\u003C/script>\r\n```\r\n\r\nStep 2\r\n\r\nPage md\r\n```\r\n\u003CTest />\r\n\u003Cscript setup>\r\n import Test from '../components/Test.vue'\r\n\u003C/script>\r\n\r\n````\r\n\r\n\r\nResult\r\n\r\n\r\n\r\nBut\r\n\r\nI change for example\r\n\r\n```vue\r\n\r\n\u003Cscript lang=\"jsx\">\r\nimport { defineComponent } from \"vue\";\r\nexport default defineComponent({\r\n render() {\r\n return (\r\n \u003Cdiv>\r\n Hello World :defineConfig\r\n \u003C/div>\r\n );\r\n },\r\n});\r\n\r\n\u003C/script>\r\n\r\n```\r\n\r\nworks\r\n\r\n\r\n\r\nHELP PLEASE\r\n\r\n### Reproduction\r\n\r\nno\r\n\r\n### Expected behavior\r\n\r\nI would expect the component to be seen\r\n\r\n### System Info\r\n\r\n```sh\r\n$ npx envinfo --system --npmPackages vitepress --binaries --browsers\r\nnpx: installed 1 in 2.22s\r\n\r\n System:\r\n OS: Windows 10 10.0.19045\r\n CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz \r\n Memory: 5.52 GB / 15.82 GB\r\n Binaries:\r\n Node: 14.19.0 - D:\\nodejs\\node.EXE\r\n Yarn: 1.22.17 - D:\\nodejs\\yarn.CMD\r\n npm: 6.14.16 - D:\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (113.0.1774.50)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: ^1.0.0-beta.1 => 1.0.0-beta.1\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nI want to document my component library in react with vitepress; It might sound crazy but I had a leap of faith says Toretto hehe\r\n\r\nVite config\r\n```ts\r\nimport { defineConfig } from \"vite\";\r\nimport vueJsx from \"@vitejs/plugin-vue-jsx\";\r\nexport default defineConfig({\r\n plugins: [\r\n vueJsx(),\r\n ],\r\n});\r\n\r\n```\r\n\r\n@antfu do you know jeje?\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.",[2945],{"name":2946,"color":2947},"bug: pending triage","e99695",2427,"closed","I try to render React component from library with @vitejs/plugin-vue-jsx and failed. But i render simple div works :(","2023-06-07T00:04:34Z","https://github.com/vuejs/vitepress/issues/2427",0.74172616,{"description":2955,"labels":2956,"number":2958,"owner":2871,"repository":2872,"state":2949,"title":2959,"updated_at":2960,"url":2961,"score":2962},"### Describe the bug\n\n# 问题描述\r\n根据官方文档的描述,如果每个文档页面中的frontmatter没有设置上下页链接,它会根据sidebar侧边栏推断出上下页跳转,在[我的项目](https://i-am-shy.github.io/vitepress/)中,仅仅只是添加了几个文档页面(都是默认最简单的配置并没有使用自定义主题)\r\n\r\n\r\n**错误展示**\r\n\r\n在这个页面(包括后续的页面,它们都被定向到了第一个文档的位置)中没有正确的按照侧边栏推断出上下页\r\n\r\n\r\n\r\n[这里](https://github.com/I-am-shy/vitepress/blob/main/docs/JS/Animation/index.md)查看这个页面的md代码\r\n\r\n\r\n\n\n### Reproduction\n\n可以查看我在github部署的[项目](https://i-am-shy.github.io/vitepress/)\r\n\r\n---\r\n在每个文档页中都是普通的md,并没有设置frontmatter 配置相关的内容\r\n\r\n这是我的config.mts:\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\n\r\n// https://vitepress.dev/reference/site-config\r\nexport default defineConfig({\r\n lang: 'zh-CN',\r\n base: '/vitepress/',\r\n title: \"shy的学习笔记\",\r\n description: \"一个文档网站\",\r\n lastUpdated: true,\r\n head:[\r\n ['link',{ rel: 'icon', href: '/vitepress/favicon.ico' }]\r\n ],\r\n themeConfig: {\r\n // https://vitepress.dev/reference/default-theme-config\r\n nav: [\r\n { text: '主页', link: '/' },\r\n { text: 'md语法', link: '/markdown-examples' },\r\n ],\r\n\r\n sidebar: [\r\n {\r\n text: 'md语法',\r\n items: [\r\n { text: 'Markdown 例子', link: '/markdown-examples' },\r\n { text: '运行时 API 例子', link: '/api-examples' }\r\n ],\r\n collapsed: false\r\n },\r\n {\r\n text: \"JS\",\r\n items:[\r\n {\r\n text: \"浏览器API\",\r\n items: [\r\n { text: \"js实现拍摄和录屏功能\", link: \"/JS/Video\"}\r\n ],\r\n collapsed: true\r\n }, \r\n {\r\n text: \"js动画库\",\r\n items: [\r\n {text: \"popmotion\", link: \"/JS/Animation\"}\r\n ],\r\n collapsed: true\r\n },\r\n {\r\n text: \"ThreeJS 3D模型\",\r\n items:[\r\n { text: \"基本概念\", link: \"/JS/ThreeJS\"},\r\n { text: \"初始化场景模型\", link: \"/JS/ThreeJS/init\"},\r\n { text: \"第一个3D场景模型\", link:\"/JS/ThreeJS/scene\"},\r\n { text: \"几何矩阵\" , link:\"/JS/ThreeJS/geometry\"},\r\n ],\r\n collapsed: true\r\n },\r\n { text: \"js爬虫\", link: \"/JS/Clawler\" },\r\n { text: \"js流\", link: \"/JS/Stream\"},\r\n { text: \"http-server\",link: \"/JS/http-server\"},\r\n { text: \"html转markdown\", link: \"/JS/Turndown\"},\r\n { text: \"2d物理引擎\", link: \"/JS/Matter\"},\r\n ],\r\n collapsed: false\r\n },\r\n {\r\n text: \"TS\",\r\n items:[\r\n {text: \"在任意位置运行ts\", link: \"/TS/run-TS\"}\r\n ],\r\n collapsed: false\r\n },\r\n {\r\n text: \"其他\",\r\n items:[\r\n {text: \"YAML\", link: \"/other/yaml\"}\r\n ],\r\n collapsed: false\r\n }\r\n ],\r\n\r\n socialLinks: [\r\n { icon: 'github', link: 'https://github.com/I-am-shy/vitepress' }\r\n ],\r\n\r\n search: {\r\n provider: 'local'\r\n },\r\n\r\n lastUpdated:{\r\n text: '最后更新时间',\r\n formatOptions: {\r\n dateStyle: 'short',\r\n timeStyle: 'short'\r\n }\r\n },\r\n\r\n\r\n }\r\n})\r\n```\n\n### Expected behavior\n\n自动推断可以在后续的文档项目中减少工作量,希望可以修复这个问题,或者指出我在项目中错误的代码部分,万分感谢😥😥😥\n\n### System Info\n\n```Text\nSystem:\r\n OS: macOS 15.0.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 136.16 MB / 8.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.17.0 - /usr/local/bin/node\r\n npm: 10.8.2 - /usr/local/bin/npm\r\n Browsers:\r\n Chrome: 131.0.6778.87\r\n Edge: 131.0.2903.70\r\n Safari: 18.0.1\r\n npmPackages:\r\n vitepress: ^1.5.0 => 1.5.0\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.",[2957],{"name":2946,"color":2947},4403,"上下页的自动推断功能异常","2024-12-12T04:45:57Z","https://github.com/vuejs/vitepress/issues/4403",0.74369985,{"description":2964,"labels":2965,"number":2967,"owner":2871,"repository":2872,"state":2949,"title":2968,"updated_at":2969,"url":2970,"score":2971},"### Describe the bug\r\n\r\nI am documenting a vue 3 component which uses a dynamic template:\r\n\r\n \u003CVRuntimeTemplate :template=\"'\u003Cdiv>' + md + '\u003C/div>'\" />\r\n\r\nThis requires use of vue/dist/vue.esm-bundler.js.\r\n\r\nThe application itself works with the following alias in the vite.config.ts file: \r\n```\r\nexport default defineConfig({\r\n plugins: [vue()],\r\n define: {\r\n global: {},\r\n },\r\n resolve: {\r\n alias: {\r\n \"@\": fileURLToPath(new URL(\"./src\", import.meta.url)),\r\n 'vue': 'vue/dist/vue.esm-bundler.js',\r\n './runtimeConfig': './runtimeConfig.browser',\r\n },\r\n },\r\n});\r\n````\r\n\r\nHowever, the vitepress documentation does not. I have added the same alias to the vitepress configuration file:\r\n```\r\nconst path = require('path')\r\nmodule.exports = {\r\n title: '',\r\n description: '',\r\n themeConfig: {\r\n repo: '',\r\n sidebar: [\r\n {\r\n text: 'Introduction',\r\n items: [\r\n { text: 'What is My Lib?', link: '/' },\r\n ],\r\n }, {\r\n text: 'Components',\r\n items: [\r\n { text: 'B-Markdown', link: '/components/b-markdown/desc' },\r\n ],\r\n }\r\n ],\r\n },\r\n vite: {\r\n resolve: {\r\n alias: {\r\n 'vue': 'vue/dist/vue.esm-bundler.js'\r\n }\r\n },\r\n }\r\n}\r\n\r\n```\r\n\r\nThe dynamic component does not display and a vue warning is generated suggesting that I add the alias to the bundler:\r\n```\r\nruntime-core.esm-bundler.js:38 [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\". \r\n at \u003CAnonymous content=\"Test content.\" imgFolder=\"\" class=\"toastui-editor-contents\" ... > \r\n at \u003CVRuntimeTemplate class=\"toastui-editor-contents\" style= {max-width: '900px', margin: 'auto'} template=\"\u003Cdiv>\u003Cp>Test content.\u003C/p>\\n\u003C/div>\" > \r\n at \u003CBMarkdown content=\"Test content.\" > \r\n at \u003CBasic> \r\n at \u003CDemoContainer> \r\n at \u003CComponents/bMarkdown/desc.md> \r\n at \u003CVitePressContent class=\"vp-doc _components_b-markdown_desc\" > \r\n at \u003CVPDoc key=3 > \r\n at \u003CVPContent> \r\n at \u003CLayout> \r\n at \u003CVitePressApp>\r\n\r\n\r\n```\r\n\r\n\r\n### Reproduction\r\n\r\n1. Create a dynamic component using vue3-runtime-template.\r\n2. Add the dynamic component to a vitepress documentation page.\r\n3. Attempt to view the documentation page.\r\n\r\n### Expected behavior\r\n\r\nExpect to see the dynamic component (which works in the vite application but not in the vitepress documentation).\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)\r\n CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor\r\n Memory: 1.45 GB / 15.59 GB\r\n Container: Yes\r\n Shell: 5.0.17 - /bin/bash\r\n Binaries:\r\n Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node\r\n npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.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] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.vuejs.org).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2966],{"name":2882,"color":2883},1065,"Alias Vue in config.js not working","2023-03-18T00:04:23Z","https://github.com/vuejs/vitepress/issues/1065",0.7481592,["Reactive",2973],{},["Set"],["ShallowReactive",2976],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fqVQi0nF4NghbCpJgHmUsMCATup-wlRj8K_3PlpPE-Ws":-1},"/vuejs/vitepress/2397"]