\r\n\u003C/template>\r\n\r\n```\r\n\r\n- `index.md`:\r\n\r\n```md\r\n---\r\nlayout: home\r\n---\r\n\r\n\u003Cscript setup>\r\nimport { useData } from 'vitepress'\r\n\u003C/script>\r\n\r\n{{ useData() }}\r\n```\r\n\r\nSee \u003Chttps://stackblitz.com/edit/vite-x3jrgk>.\n\n### Expected behavior\n\nThere should be no such warning.\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.5\r\n CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz\r\n Memory: 224.85 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.5.1 - /usr/local/bin/node\r\n npm: 9.8.0 - /usr/local/bin/npm\r\n pnpm: 8.6.6 - /usr/local/bin/pnpm\r\n Browsers:\r\n Chrome: 116.0.5845.110\r\n Edge: 115.0.1901.188\r\n Safari: 16.6\r\n npmPackages:\r\n vitepress: 1.0.0-rc.4 => 1.0.0-rc.4\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.",[2894],{"name":2868,"color":2869},2856,"Imports from vitepress in markdown files lead to reexport warning","2023-09-03T00:04:43Z","https://github.com/vuejs/vitepress/issues/2856",0.6527337,{"description":2901,"labels":2902,"number":2904,"owner":2874,"repository":2875,"state":2886,"title":2905,"updated_at":2906,"url":2907,"score":2908},"### Describe the bug\n\n版本:\"vitepress\": \"^1.0.0-alpha.35\", \r\n里面没有多余的东西。就是按照官网https://vitepress.vuejs.org/guide/getting-started 走到了第三步。然后将 index.md 的内容添加了 {1}\r\n\r\n\r\n\r\n\n\n### Reproduction\n\n按照官网https://vitepress.vuejs.org/guide/getting-started 走到了第三步。然后将 index.md 的内容添加了 {1}\n\n### Expected behavior\n\n正常渲染 {1} 标签的内容\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.22621\r\n CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H\r\n Memory: 1.50 GB / 15.73 GB\r\n Binaries:\r\n Node: 16.15.1 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.11.0 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.22621.963.0), Chromium (108.0.1462.76)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.35 => 1.0.0-alpha.35\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.",[2903],{"name":2868,"color":2869},1781,"在内容里使用 {xxx} 就会报错","2023-01-21T14:16:43Z","https://github.com/vuejs/vitepress/issues/1781",0.65408444,{"description":2910,"labels":2911,"number":2913,"owner":2874,"repository":2875,"state":2886,"title":2914,"updated_at":2915,"url":2916,"score":2917},"### Describe the bug\n\n\u003Cimg width=\"269\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/61684763/10622fbc-efb0-4dbd-a342-5c4e73ed04a0\">\r\n\u003Cimg width=\"1272\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/61684763/42577ef3-634d-459e-bf05-97ada3afef7b\">\r\n以前旧版本是没有这个问题的。升级后才有的。\n\n### Reproduction\n\n升级vitepress打包部署后出现的\n\n### Expected behavior\n\n望能修复正常\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 57.69 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node\r\n Yarn: 1.22.19 - ~/.nvm/versions/node/v16.14.0/bin/yarn\r\n npm: 9.8.0 - ~/.nvm/versions/node/v16.14.0/bin/npm\r\n Watchman: 2023.03.27.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Chrome: 115.0.5790.170\r\n Safari: 16.5.2\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.",[2912],{"name":2868,"color":2869},2772,"升级vitepress后部署到阿里云服务器后,刷新页面会404","2023-08-18T00:04:13Z","https://github.com/vuejs/vitepress/issues/2772",0.65579313,{"description":2919,"labels":2920,"number":2925,"owner":2874,"repository":2875,"state":2886,"title":2926,"updated_at":2927,"url":2928,"score":2929},"### Describe the bug\n\nWhen I initialize a new project and access it, it returns\r\n\r\n[plugin:vite:import-analysis] Failed to resolve import \"@vue/composition-api/dist/vue-composition-api.mjs\" from \"../node_modules/vue-demi/lib/index.mjs?v=2157b86a\". Does the file exist?\r\n\r\n\n\n### Reproduction\n\nvitepress v1.0.0-alpha.65\r\n\r\n┌ Welcome to VitePress! \r\n│\r\n◇ Where should VitePress initialize the config?\r\n│ ./docs\r\n│\r\n◇ Site title:\r\n│ My Awesome Project\r\n│\r\n◇ Site description:\r\n│ A VitePress Site\r\n│\r\n◇ Theme:\r\n│ Default Theme\r\n│\r\n◇ Use TypeScript for config and theme files?\r\n│ Yes\r\n│\r\n◇ Add VitePress npm scripts to package.json?\r\n│ Yes\r\n│\r\n└ Done! Now run npm run docs:dev and start writing.\r\n\r\n\r\nnpm run docs:dev\r\n\r\n\r\n> docs:dev\r\n> vitepress dev docs\r\n\r\nfailed to start server. error:\r\nError: Failed to resolve vue/compiler-sfc.\r\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.\r\n at resolveCompiler (file:///Users/nroy/node_modules/@vitejs/plugin-vue/dist/index.mjs:12:11)\r\n at Context.buildStart (file:///Users/nroy/node_modules/@vitejs/plugin-vue/dist/index.mjs:2667:46)\r\n at hookParallel (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:42977:47)\r\n at Object.buildStart (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:43291:19)\r\n at file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:63012:29\r\n at initServer (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:63019:11)\r\n at Server.httpServer.listen (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:63027:23)\r\n at file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:53058:20\r\n at new Promise (\u003Canonymous>)\r\n at httpServerStart (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:53040:12)\r\n\r\n\r\nim install new vue\r\n\r\n\r\n\r\n> vitepress dev docs\r\n\r\n\r\n vitepress v1.0.0-alpha.65\r\n\r\n ➜ Local: http://localhost:5173/\r\n ➜ Network: use --host to expose\r\n\r\n\r\n\r\nFailed to resolve import \"@vue/composition-api/dist/vue-composition-api.mjs\" from \"../node_modules/vue-demi/lib/index.mjs?v=2157b86a\". Does the file exist?\r\nFailed to resolve import \"@vue/composition-api/dist/vue-composition-api.mjs\" from \"../node_modules/vue-demi/lib/index.mjs?v=2157b86a\". Does the file exist? (x2)\r\n11:29:14 [vitepress] Internal server error: Failed to resolve import \"@vue/composition-api/dist/vue-composition-api.mjs\" from \"../node_modules/vue-demi/lib/index.mjs?v=2157b86a\". Does the file exist?\r\n Plugin: vite:import-analysis\r\n File: /Users/nroy/node_modules/vue-demi/lib/index.mjs?v=2157b86a:2:32\r\n 1 | import Vue from 'vue'\r\n 2 | import VueCompositionAPI from '@vue/composition-api/dist/vue-composition-api.mjs'\r\n | ^\r\n 3 | \r\n 4 | function install(_vue) {\r\n at formatError (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:43113:46)\r\n at TransformContext.error (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:43109:19)\r\n at normalizeUrl (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:41378:33)\r\n at async TransformContext.transform (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:41512:47)\r\n at async Object.transform (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:43387:30)\r\n at async loadAndTransform (file:///Users/nroy/node_modules/vite/dist/node/chunks/dep-79892de8.js:41105:29)\r\n\r\n\n\n### Expected behavior\n\nUnable to access normally\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 12.5\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 244.26 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm\r\n Watchman: 2021.06.07.00 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 112.0.5615.49\r\n Safari: 15.6\n```\n\n\n### Additional context\n\n\u003Cimg width=\"1051\" alt=\"image\" src=\"https://user-images.githubusercontent.com/33707417/231934722-5d1521f4-52a2-471f-b74d-085d4a91eb5f.png\">\r\n\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] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2921,2924],{"name":2922,"color":2923},"need more info","bdbefc",{"name":2871,"color":2872},2213,"[plugin:vite:import-analysis] Failed to resolve import","2023-08-15T00:04:21Z","https://github.com/vuejs/vitepress/issues/2213",0.6580278,{"description":2931,"labels":2932,"number":2935,"owner":2874,"repository":2875,"state":2886,"title":2936,"updated_at":2937,"url":2938,"score":2939},"### Describe the bug\n\n### dependencies\r\n\r\n`pnpm add @chenwei02/qy-element`\r\n> `@chenwei02/qy-element` has svg-icon component. svg files builded by vite-plugin-svg-icons.\r\n\r\n### docs\r\n`vitepress dev docs` is ok\r\n`vitepress build docs` then deploy to gh-pages, *.svg icon was blank.\r\n\r\n### Problem\r\nvitepress build docs . something is wrong.\r\n\r\n### Help\r\nI need help\n\n### Reproduction\n\npnpm add @chenwei02/qy-element\r\n\r\n*.md\r\n\u003Cqy-icon name=\"close\">\r\n\r\nvitepress build docs.\n\n### Expected behavior\n\nevery thing is ok.\n\n### System Info\n\n```sh\nvitepress : 1.0.0-alpha.64\r\n@chenwei02/qy-element: 1.0.2-p1\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.",[2933,2934],{"name":2868,"color":2869},{"name":2871,"color":2872},2385,"Vitepress build Problem","2023-08-18T00:04:08Z","https://github.com/vuejs/vitepress/issues/2385",0.6591391,{"description":2941,"labels":2942,"number":2946,"owner":2874,"repository":2875,"state":2886,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Describe the bug\n\n使用官方文档的部署脚本成功部署到Github Pages之后,此时如果配置使用自定义域名的话,访问时样式会丢失\n\n### Reproduction\n\n1. 博客目录结构如下所示:\u003Cbr />\r\n2. 配置文件如下所示:\u003Cbr /> \n\n### Expected behavior\n\n使用 Github 自带的 https://xihuanxiaorang.github.io/docs/ 访问就没有任何问题,如果是使用自定义域名 https://docs.xiaorang.fun/ 的话,样式就会丢失\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz\r\n Memory: 659.73 MB / 3.92 GB\r\n Binaries:\r\n Node: 20.11.0 - E:\\nodejs\\node.EXE\r\n Yarn: 1.22.21 - E:\\nodejs\\node_global\\yarn.CMD\r\n npm: 10.2.4 - E:\\nodejs\\npm.CMD\r\n pnpm: 8.14.3 - E:\\nodejs\\node_global\\pnpm.CMD\r\n Browsers:\r\n Edge: Chromium (120.0.2210.144)\r\n Internet Explorer: 11.0.19041.3636\r\n npmPackages:\r\n vitepress: 1.0.0-rc.40 => 1.0.0-rc.40\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.",[2943],{"name":2944,"color":2945},"question","5D5FAE",3513,"部署到Github Pages之后,如果使用自定义域名的话样式会丢失","2024-02-07T00:04:15Z","https://github.com/vuejs/vitepress/issues/3513",0.6610273,{"description":2952,"labels":2953,"number":2956,"owner":2874,"repository":2875,"state":2886,"title":2957,"updated_at":2958,"url":2959,"score":2960},"### Describe the bug\r\n\r\nI use some image in vue component, by using\r\n```js\r\nnew URL('@theme/public/my-image.jpg', import.meta.url).href\r\n```\r\nit works while `dev`, but not work while `preview` (after `build`), in the html file, it looks like this, \r\n```html\r\n\u003Cimg src=\"file://home/user/project/.vitepress/.temp/public/my-image.jpg\" />\r\n```\r\nrather than\r\n```html\r\n\u003Cimg src=\"/assets/my-image.47d9f72.jpg\" />\r\n```\r\n\r\nIs there some configurations or processing to resolve this problem?\r\n\r\n### Reproduction\r\n\r\nnone.\r\n\r\n### Expected behavior\r\n\r\nbuild successfully\r\n\r\n### System Info\r\n\r\n```sh\r\nOS: Windows 10/Ubuntu 20.04\r\nVitePress: 1.0.0-alpha75\r\nVue: 3.2.47\r\nelement-plus: 2.3.4\r\npnpm: 8.5.0\r\nnodejs: 18.16.0\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.",[2954,2955],{"name":2868,"color":2869},{"name":2871,"color":2872},2357,"After build, the src of img tag as 'file://home/user/xxx/.vitepress/.temp/xxx.png'","2023-08-12T00:04:09Z","https://github.com/vuejs/vitepress/issues/2357",0.6611239,{"description":2962,"labels":2963,"number":2965,"owner":2874,"repository":2875,"state":2886,"title":2966,"updated_at":2967,"url":2968,"score":2969},"### Describe the bug\n\nI imported a lib which called document APIs. The minimized reproduction:\r\n\r\n```\r\n\u003Cscript>\r\nconst div = document.createElement('div');\r\nconsole.log(div)\r\n\u003C/script>\r\n\r\n# Hello World\r\n```\r\n\r\nIt works in vitepress dev but fails in vitepress build\n\n### Reproduction\n\nhttps://github.com/Jinjiang/reproductions/tree/vitepress-document-20240219\n\n### Expected behavior\n\nWorks as vitepress dev does\n\n### System Info\n\n```Text\n$ npx envinfo --system --npmPackages vitepress --binaries --browsers\r\n\r\n System:\r\n OS: macOS 14.4\r\n CPU: (8) arm64 Apple M1\r\n Memory: 75.17 MB / 8.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 20.1.0 - ~/.asdf/installs/nodejs/20.1.0/bin/node\r\n Yarn: 1.22.19 - ~/.asdf/shims/yarn\r\n npm: 9.6.4 - ~/.asdf/plugins/nodejs/shims/npm\r\n Browsers:\r\n Safari: 17.4\r\n npmPackages:\r\n vitepress: 1.0.0-rc.43 => 1.0.0-rc.43\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.",[2964],{"name":2868,"color":2869},3583,"document is not defined when vitepress build","2024-02-27T00:05:55Z","https://github.com/vuejs/vitepress/issues/3583",0.66254115,["Reactive",2971],{},["Set"],["ShallowReactive",2974],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fEJ5W8g8bzdLrHpFndeDcU9qbCQr0xS3N7NVN0EMqeyY":-1},"/vuejs/vitepress/4519"]