\n\u003Cimg width=\"1890\" height=\"470\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1b63e5fd-3d4d-4c14-8861-271409800222\" />\n\u003Cimg width=\"1420\" height=\"215\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1d036d80-1d0f-445e-a799-9763e9b5580e\" />\n\n\n\n### Reproduction\n\nno\n\n### Expected behavior\n\nCan add public path normally\n\n### System Info\n\n```Text\nwindows11 ,chrome latest\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.",[3167],{"name":3168,"color":3169},"need more info","bdbefc",4886,"Document deployment does not support the base option (public path) of the VitePress configuration.?","2025-08-06T06:36:15Z","https://github.com/vuejs/vitepress/issues/4886",0.67532665,{"description":3176,"labels":3177,"number":3181,"owner":3146,"repository":3147,"state":3148,"title":3182,"updated_at":3183,"url":3184,"score":3185},"### Describe the bug\r\n\r\nWhen using [`base`](https://vitepress.vuejs.org/config/basics.html#base), `route.path` is different across client and server.\r\n\r\nFor example, when using base `/base/` and logging `route.path`, `vitepress build` will log `/index.html`, but when visited in the browser, it logs `/base/index.html`.\r\n\r\n\r\n### Reproduction\r\n\r\n[Minimal reproduction link](https://github.com/privatenumber/issue-reproductions/tree/master/reproductions/vuejs/vitepress/587)\r\n\r\n1. Create a project with the following files:\r\n\r\n.vitepress/config.js\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n\tbase: '/base/'\r\n})\r\n```\r\n\r\nindex.md:\r\n```html\r\n\u003Cscript setup>\r\nimport { useRoute } from 'vitepress';\r\n\r\nconst route = useRoute();\r\nconsole.log(`\\n\\nBUG: \"route.path\" is different across server and client: \"${route.path}\"\\n\\n`);\r\n\u003C/script>\r\n\r\nHello world\r\n```\r\n\r\n2. Run`vitepress build` and see `/index.html` get logged\r\n\r\n3. Run `vitepress serve` and see `/base/index.html` get logged\r\n\r\n\r\n### Expected behavior\r\n\r\nFor `route.path` to be consistent across server and client.\r\n\r\n### System Info\r\n\r\n```shell\r\nN/A\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nRelated: https://github.com/vuejs/vitepress/issues/446\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.",[3178],{"name":3179,"color":3180},"duplicate","cfd3d7",587,"base not used in route.path in server side","2023-01-21T16:04:13Z","https://github.com/vuejs/vitepress/issues/587",0.67903006,{"description":3187,"labels":3188,"number":3192,"owner":3146,"repository":3147,"state":3148,"title":3193,"updated_at":3194,"url":3195,"score":3196},"### Describe the bug\n\nIf you configure the base config property, it somewhat works on dev. The way it appears to work is that it navigates to the requested page, but proceeds to redirect you to the true page directly after. \r\n\r\nIf this is how it works on dev, it isn't really a foolproof solution. \r\n\r\nThe issue mainly is that on a built copy, this method doesn't work at all. Even if you have a base config property, it doesn't redirect you. \r\n\r\nKeep in mind that I'm using these links in _layout.vue_ which may be different in an md file. \n\n### Reproduction\n\nCreate an app, \r\nconfigure the base\r\nGo to layout\r\nCreate some links, say, to /about\r\nTry to navigate on dev, seemingly goes to /about then redirects to /${base}/about\r\n- works\r\nBuild the project\r\nPreview\r\nTry to navigate to /about\r\n- does not work -> goes directly to /about and not /`${base}/about\n\n### Expected behavior\n\nIt would be nice if Vitepress was smart enough to compile all the links with the base property. Like I've said, it seems that the method is redirection, but perhaps I'm confused. \n\n### System Info\n\n```sh\nSystem:\r\n OS: Linux 6.2 Pop!_OS 22.04 LTS\r\n CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor\r\n Memory: 7.46 GB / 15.53 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 18.16.0 - /run/user/1000/fnm_multishells/11424_1683296095333/bin/node\r\n npm: 9.5.1 - /run/user/1000/fnm_multishells/11424_1683296095333/bin/npm\r\n Browsers:\r\n Firefox: 112.0.2\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.75 => 1.0.0-alpha.75\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.",[3189],{"name":3190,"color":3191},"docs","0075ca",2339,"Config 'base' option works on dev, but doesn't quite work on build","2023-06-03T00:03:55Z","https://github.com/vuejs/vitepress/issues/2339",0.6861924,{"description":3198,"labels":3199,"number":3200,"owner":3146,"repository":3147,"state":3148,"title":3201,"updated_at":3202,"url":3203,"score":3204},"**Describe the bug**\r\nTo set 'base' property in '.vitepress/config.js', and run 'vitepress dev docs' behind nginx. When access it, the 'index.js' can't be loaded. Because it's path missed 'base' path. \r\nServer response like this:\r\n``` html\r\n\u003C!DOCTYPE html>\r\n\u003Chtml>\r\n \u003Chead>\r\n \u003Cmeta charset=\"utf-8\">\r\n \u003C/head>\r\n \u003Cbody>\r\n \u003Cdiv id=\"app\">\u003C/div>\r\n \u003Cscript type=\"module\" src=\"/@fs//xxxxxxxxx/doc-index/node_modules/vitepress/dist/client/app/index.js\">\u003C/script>\r\n \u003C/body>\r\n\u003C/html>\r\n```\r\nI set the base is '/docs/'. So, the path of 'index.js' shuld be: \r\n``` html \r\n/docs/@fs//xxxxxxxxx/doc-index/node_modules/vitepress/dist/client/app/index.js\r\n```\r\n\r\nBy the way, line number 131 of 'vitepress/src/node/plugin.js' shuld be: \r\n``` html\r\n\u003Cscript type=\"module\" src=\"${siteData.base}@fs/${APP_PATH}/index.js\">\u003C/script>\r\n```\r\n\r\n**System Info**\r\n- vitepress version: 0.14.1\r\n- vite version: 2.3.7\r\n- Node version: v12.8.1\r\n- OS version: Windows 10 pro 21H1 19043.1055\r\n",[],319,"missed 'base' path when run 'vitepress dev docs' behind nginx","2023-01-21T14:32:44Z","https://github.com/vuejs/vitepress/issues/319",0.687267,{"description":3206,"labels":3207,"number":3208,"owner":3146,"repository":3147,"state":3148,"title":3209,"updated_at":3210,"url":3211,"score":3212},"### Discussed in https://github.com/vuejs/vitepress/discussions/609\r\n\r\n\u003Cdiv type='discussions-op-text'>\r\n\r\n\u003Csup>Originally posted by **Roman-00** April 25, 2022\u003C/sup>\r\nWhen hosting, I have already brought down this project for hosting in a subdirectory https://domain.com/ms/guide , can't get to js files and styles, writes 404. How can I specify the path to styles and js files when building\r\n\r\n\r\nCan I somehow register the path to the files myself within vitepress?\u003C/div>",[],610,"When hosting, I have already brought down this project for hosting in a subdirectory https://domain.com/ms/guide , can't get to js files and styles, writes 404","2023-01-21T16:04:28Z","https://github.com/vuejs/vitepress/issues/610",0.69889176,{"description":3214,"labels":3215,"number":3217,"owner":3146,"repository":3147,"state":3148,"title":3218,"updated_at":3219,"url":3220,"score":3221},"### Is your feature request related to a problem? Please describe.\r\n\r\nWhen reading the docs of VitePress from beginning to end, I found that `base` is mentioned the first time in https://vitepress.vuejs.org/guide/deploying.html#github-pages , I didn't know what it was for until I found https://vitepress.vuejs.org/config/app-configs.html#base .\r\n\r\n### Describe the solution you'd like\r\n\r\nIt would be nice to briefly describe what `base` does in the [Deploying](https://vitepress.vuejs.org/guide/deploying.html) section, or at least add a link to the [App Configs](https://vitepress.vuejs.org/config/app-configs.html#base) page.\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.",[3216],{"name":3190,"color":3191},789,"Explanation of `base`","2023-01-21T14:32:36Z","https://github.com/vuejs/vitepress/issues/789",0.7002333,{"description":3223,"labels":3224,"number":3226,"owner":3146,"repository":3147,"state":3148,"title":3227,"updated_at":3228,"url":3229,"score":3230},"### Describe the bug\n\njust like title decribe,\r\nin vit.config.js i just set ssr option`noExternal: ['packages']`, base option does not work in product. In builded html file the js assets path is '/assets/jsfile.js' which should be `/docs/assets/jsfile.js`. And if i use --base='/docs/' the res path will add base url but when i put it on my server it dont work and shows `Hydration completed but contains mismatch` in my console\n\n### Reproduction\n\nidk, it huge project, monorepo\n\n### Expected behavior\n\nlike dev when i put it in nginx\n\n### System Info\n\n```Text\nvitpress 1.2.3\r\npnpm: 9.4.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.",[3225],{"name":3168,"color":3169},3984,"base option dont work in build in vite.config.js, if use in commend line like '--base=./' Hydration completed but contains mismatch","2024-07-04T04:41:53Z","https://github.com/vuejs/vitepress/issues/3984",0.70356464,{"description":3232,"labels":3233,"number":3234,"owner":3146,"repository":3147,"state":3148,"title":3235,"updated_at":3236,"url":3237,"score":3238},"\u003C!--\r\nNOTE:\r\nVitePress is still WIP, and it is not compatible with VuePress.\r\nPlease do not open issue about default theme missing features or something doesn't work like VuePress.\r\n-->\r\n\r\n**Describe the bug**\r\nSwitch language error when build with a base path\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n[](https://github.com/dewfall123/vitepress-issues)\r\n1. clone [https://github.com/dewfall123/vitepress-issues](https://github.com/dewfall123/vitepress-issues)\r\n2. run \r\n`yarn` \r\n`yarn build`\r\n`yarn build-dev`\r\n3. open http://127.0.0.1:3001 and switch language several times.\r\nIt go to error path like http://127.0.0.1:3001/vhooks/vhooks/zh/index.html.\r\n\r\n**Expected behavior**\r\nSwitch language and go to the correct path.\r\n\r\n**System Info**\r\n- vitepress version: 0.7.0\r\n- vite version: v1.0.0-rc.4\r\n- Node version: 14\r\n- OS version: window 10\r\n\r\n\r\n",[],103,"Switch language error when build with a base path","2023-01-21T16:24:23Z","https://github.com/vuejs/vitepress/issues/103",0.70462286,["Reactive",3240],{},["Set"],["ShallowReactive",3243],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fNf4_ihc_e4TYV7GR3TRptWlAautpjIKSKQHGibcXYDg":-1},"/vuejs/vitepress/2144"]