\r\n\r\nIt is inevitable to use `document` in `vitepress` many times, but how to avoid the packaging error when` vitepress` uses the server-side rendering method?\r\n\r\nAre there any third-party plug-in recommendations or configuration items?\n\n### Reproduction\n\n```vue\r\n\u003Cscript setup>\r\n console.log(document)\r\n\u003C/script>\r\n```\r\n\r\n\r\n\n\n### Expected behavior\n\nBuild ok\n\n### System Info\n\n```shell\n\"vitepress\": \"^1.0.0-alpha.4\",\r\n\"vue\": \"^3.2.33\"\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.",[2932],{"name":2868,"color":2869},1120,"document is not defined","2023-01-21T14:28:51Z","https://github.com/vuejs/vitepress/issues/1120",0.6784279,{"description":2939,"labels":2940,"number":2944,"owner":2871,"repository":2872,"state":2873,"title":2945,"updated_at":2946,"url":2947,"score":2948},"### Is your feature request related to a problem? Please describe.\r\n\r\n- 自定义vue组件库,会用到很多第三方插件,比如:[@wangeditor/editor](https://github.com/nikitasnv/vue-resizable),[vue-resizable](https://github.com/wangeditor-team/wangEditor)等,而这些插件,都会用到window,document等这些变量\r\n\r\n- 当使用 vitepress 构建组件库文档时,`pnpm run build`,就会报错:\r\n```\r\nbuild error:\r\nReferenceError: document is not defined\r\n```\r\n\r\n- 如果都去让第三方插件作者去修改代码,这样也有点不切实际\r\n\r\n\r\n### Describe the solution you'd like\r\n\r\n- vitepress build的时候,能否可以配置关闭SSR?或者有没有别的办法可以解决上述报错?非常感谢\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\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] 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.",[2941],{"name":2942,"color":2943},"build","377ba8",1727,"Allow disabling SSR","2023-01-31T00:04:44Z","https://github.com/vuejs/vitepress/issues/1727",0.6785204,{"description":2950,"labels":2951,"number":2952,"owner":2871,"repository":2872,"state":2873,"title":2953,"updated_at":2954,"url":2955,"score":2956},"### Is your feature request related to a problem? Please describe.\n\nInstead of the ability to re-use the vite config of existing project when we want to leverage Vitepress, we currently have to move the vite config under the `vite` parameter of config.ts. \r\n\r\nThis is an inconvenience and ability to retain our current Vite config file would be provide a great DX. \n\n### Describe the solution you'd like\n\nIntroduce a `configFile` similar to what's done in Vuepress-next, where we are able to specify the path of an existing vite config file. For Vuepress-next, please check here - https://github.com/vuepress/vuepress-next/blob/main/packages/bundler-vite/src/resolveViteConfig.ts#L25 \r\n\r\nVitepress previously did merge config from existing vite config file, for eg, check Pinia's docs site here - https://github.com/vuejs/pinia/tree/v2/packages/docs\r\n\r\nThat said, this request is to not bring back merging by default, and it's totally understandable why we want to extend vite config via the standard vitepress config file. \r\n\r\nRather, this request is to opt-in to specify a configFile, when we want to. This will be very helpful for those who want to add vitepress to existing vite-powered Vue apps.\n\n### Describe alternatives you've considered\n\nVuepress-next\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.",[],2743,"configFile parameter to specify vite.config.ts path like in Vuepress-next","2023-08-16T00:04:24Z","https://github.com/vuejs/vitepress/issues/2743",0.67933387,["Reactive",2958],{},["Set"],["ShallowReactive",2961],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fhOQqG8wfi1D_jNwWkM0LzRXuHBkLLU8j-sLUGEOipS0":-1},"/vuejs/vitepress/3164"]