\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.",[2900],{"name":2885,"color":2886},3513,"部署到Github Pages之后,如果使用自定义域名的话样式会丢失","2024-02-07T00:04:15Z","https://github.com/vuejs/vitepress/issues/3513",0.6485831,{"description":2907,"labels":2908,"number":2909,"owner":2874,"repository":2875,"state":2892,"title":2910,"updated_at":2911,"url":2912,"score":2913},"### Describe the bug\n\nI followed the documentation to start initializing the project, but the startup failed.\r\n\r\n1. using `npx vitepress init`, and select `Default Theme (Out of the box, good-looking docs)`,\r\n2. when I run `npm run docs:dev`, and goto `localhost:5173`, I got a vitepress error.\r\n\r\n\r\n\r\n- [related docs: #setup-wizard](https://vitepress.dev/guide/getting-started#setup-wizard)\n\n### Reproduction\n\n[https://stackblitz.com/edit/vite-5hqysu?file=package.json](https://stackblitz.com/edit/vite-5hqysu?file=package.json)\n\n### Expected behavior\n\nCan start normally\n\n### System Info\n\n```Text\n*\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.",[],3457,"After initializing the project, an error occurs when opening the page","2024-01-24T00:04:47Z","https://github.com/vuejs/vitepress/issues/3457",0.6522272,{"description":2915,"labels":2916,"number":2918,"owner":2874,"repository":2875,"state":2892,"title":2919,"updated_at":2920,"url":2921,"score":2922},"### Describe the bug\n\nfollow up to #2612\n\n### Reproduction\n\ndiscussed in #2612\n\n### Expected behavior\n\nclearer instructions\n\n### System Info\n\n```sh\nnpm 8.19.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.",[2917],{"name":2868,"color":2869},2781,"follow up to #2612 - missing documentation information","2023-08-21T00:04:10Z","https://github.com/vuejs/vitepress/issues/2781",0.66217095,{"description":2924,"labels":2925,"number":2927,"owner":2874,"repository":2875,"state":2892,"title":2928,"updated_at":2929,"url":2930,"score":2931},"### Describe the bug\r\n\r\n\r\n\r\nI set `base` to `'/vitepress-docs/'` in `config.js`, and I deployed it to Github Pages successfully.\r\n\r\n[Github Pages](https://guhl0427.github.io/vitepress-docs/)\r\n\r\nWith the same config, I deployed it to Vercel or Netlify failed.\r\n\r\n[Vercel](https://vitepress-docs-swart.vercel.app/)\r\n[Netlify](https://guhlblog.netlify.app/)\r\n\r\nThen I had tried set `base` to `'/'`, it deployed successfully in Vercel or Netlify, but failed in Github Pages.\r\n\r\n### Reproduction\r\n\r\n\r\nWhen I set `base` to `'/vitepress-docs/'` in `config.js`\r\n\r\nResults of deployment:\r\n+ [Github Pages(success)](https://guhl0427.github.io/vitepress-docs/)\r\n+ [Vercel(failed)](https://vitepress-docs-swart.vercel.app/)\r\n+ [Netlify(failed)](https://guhlblog.netlify.app/)\r\n\r\nWhen I set `base` to `'/'` in `config.js`\r\n\r\nResults of deployment:\r\n+ Github Pages(failed)\r\n+ Vercel(success)\r\n+ Netlify(success)\r\n\r\n### Expected behavior\r\n\r\nI want to deploy to Github Pages, Vercel, Netlify with the same `config.js` at the same time.\r\n\r\nMaybe I need do some extra configuration When I deploy to Vercel or Netlify.\r\n\r\n\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Windows 10 10.0.18363\r\n CPU: (6) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz\r\n Memory: 5.25 GB / 15.88 GB\r\n Binaries:\r\n Node: 14.20.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - C:\\Program Files\\nodejs\\yarn.CMD\r\n npm: 6.14.17 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Chrome: 104.0.5112.80\r\n Edge: Spartan (44.18362.449.0)\r\n Internet Explorer: 11.0.18362.1\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.",[2926],{"name":2868,"color":2869},1146,"I want to deploy to Github Pages, Vercel, Netlify at the same time, but something went wrong.","2023-01-21T14:28:47Z","https://github.com/vuejs/vitepress/issues/1146",0.6625092,{"description":2933,"labels":2934,"number":2938,"owner":2874,"repository":2875,"state":2892,"title":2939,"updated_at":2940,"url":2941,"score":2942},"### Describe the bug\n\nThe latest version of VitePress is not respecting `vite.config.ts` in my project (a very mini one). It's working in the stackblitz template, but my project structures a little bit differently (the `docs` folder is the root) so I'm not sure if it's a bug or it's intended.\r\n\r\nIf someone can please clone and have a look, it's really appreciated.\r\n\r\nAnd also, seems documentation of customizing `Vite`'s configuration is missing in the docs\n\n### Reproduction\n\nhttps://github.com/xsjcTony/docs\r\n\r\nI've put `vite.config.ts` in both root and under `.vitepress` but none of them works.\r\nThanks a lot for the help!\n\n### Expected behavior\n\nIt should pick up either `vite.config.ts` (either at the root or in `.vitepress` folder, I think it should pick the one at the root)\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz\r\n Memory: 42.69 GB / 63.84 GB\r\n Binaries:\r\n Node: 18.14.0 - C:\\NodeJS\\node.EXE\r\n Yarn: 1.22.19 - C:\\NodeJS\\yarn.CMD\r\n npm: 9.4.2 - C:\\NodeJS\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (110.0.1587.41)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.46 => 1.0.0-alpha.46\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.",[2935],{"name":2936,"color":2937},"docs","0075ca",1939,"Latest version of VitePress is not respecting `vite.config.ts`","2023-07-27T00:04:23Z","https://github.com/vuejs/vitepress/issues/1939",0.6631165,{"description":2944,"labels":2945,"number":2947,"owner":2874,"repository":2875,"state":2892,"title":2948,"updated_at":2949,"url":2950,"score":2951},"### Describe the bug\n\nI am writing the package of `controllable-animate` and preparing write doc for this package \r\n\r\nwhen I run npm run docs:dev it works just fine\r\nbut when I run npm run docs:build it failed\r\nand shows an error message:\r\n```sh\r\n✓ building client + server bundles...\r\nbuild error:\r\n ReferenceError: document is not defined\r\n at file:///Users/songwufan/Desktop/newPro/controllable-animate/docs/main/.vitepress/.temp/app.js:4380:3\r\n at ModuleJob.run (internal/modules/esm/module_job.js:183:25)\r\n at async Loader.import (internal/modules/esm/loader.js:178:24)\r\n at async build (file:///Users/songwufan/Desktop/newPro/controllable-animate/node_modules/.pnpm/vitepress@1.0.0-alpha.29_tbpndr44ulefs3hehwpi2mkf2y/node_modules/vitepress/dist/node/serve-fcdc8868.js:42002:24)\r\n```\r\nreproduce steps: \r\nFirst: I try to use `docuement` in vue directive like this: \r\n```ts\r\nif (typeof window !== undefined) {\r\n root = document.documentElement || document.body\r\n}\r\n```\r\nSecond: I use this package in my code :main/.vitepress/theme/index.ts\r\n```ts\r\nimport {\r\n vcontrollableanimate,\r\n} from 'controllable-animate'\r\nexport default {\r\n ...DefaultTheme,\r\n enhanceApp({ app }) {\r\n // app.Plugin\r\n app.directive('controllable-animate', vcontrollableanimate)\r\n },\r\n}\r\n```\n\n### Reproduction\n\nnone\n\n### Expected behavior\n\nIt should work in dev and build mode.\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 12.6\r\n CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz\r\n Memory: 103.34 MB / 8.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node\r\n Yarn: 1.22.17 - /usr/local/bin/yarn\r\n npm: 6.14.16 - ~/.nvm/versions/node/v14.19.0/bin/npm\r\n Watchman: 4.9.0 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 107.0.5304.110\r\n Chrome Canary: 110.0.5434.0\r\n Firefox: 97.0.2\r\n Firefox Developer Edition: 106.0\r\n Safari: 15.6.1\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.29 => 1.0.0-alpha.29\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.",[2946],{"name":2868,"color":2869},1638,"Can't build vitepress when I use npm package","2023-01-21T14:20:37Z","https://github.com/vuejs/vitepress/issues/1638",0.66730326,{"description":2953,"labels":2954,"number":2956,"owner":2874,"repository":2875,"state":2892,"title":2957,"updated_at":2958,"url":2959,"score":2960},"### Describe the bug\n\n\r\n\r\n打包报错css问题,css没有任何问题,theme里全局引入组件库的,版本\"vitepress\": \"1.0.0-beta.1\"\n\n### Reproduction\n\nv \"vitepress\": \"1.0.0-beta.1\"\n\n### Expected behavior\n\n正常打包\n\n### System Info\n\n```sh\nnpm run build\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.",[2955],{"name":2868,"color":2869},2439,"打包报错Unexpected token '.' 问题","2023-06-08T00:04:08Z","https://github.com/vuejs/vitepress/issues/2439",0.67048156,{"description":2962,"labels":2963,"number":2965,"owner":2874,"repository":2875,"state":2892,"title":2966,"updated_at":2967,"url":2968,"score":2969},"### Describe the bug\n\nUpon following the starter instructions in the [docs](https://vitepress.vuejs.org/guide/getting-started.html), running `yarn docs:dev` yields a blank webpage at `localhost:3000` with the error shown below in the console.\r\n\r\n\r\n\n\n### Reproduction\n\nFollowing the instructions outlined on the Getting Started page on [vitepress.vuejs.org](https://vitepress.vuejs.org/guide/getting-started.html).\n\n### Expected behavior\n\n\"Hello Vitepress\" should be rendered to the screen with no error messages in the console.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.13 Fedora 34 (Workstation Edition) 34 (Workstation Edition)\r\n CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz\r\n Memory: 2.30 GB / 15.28 GB\r\n Container: Yes\r\n Shell: 5.1.0 - /bin/bash\r\n Binaries:\r\n Node: 14.17.0 - /usr/bin/node\r\n Yarn: 1.22.5 - /usr/bin/yarn\r\n npm: 7.20.5 - /usr/local/bin/npm\r\n Browsers:\r\n Chrome: 92.0.4515.131\r\n Firefox: 90.0.2\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\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.",[2964],{"name":2868,"color":2869},355,"import not found: defineEmit","2023-01-21T16:22:12Z","https://github.com/vuejs/vitepress/issues/355",0.6744747,["Reactive",2971],{},["Set"],["ShallowReactive",2974],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fOd9wgTSjpGFjb2fq9pmH8xTIwmWEgzWR41AWTEEaz6k":-1},"/vuejs/vitepress/4055"]