\n\n\u003Cimg width=\"1460\" height=\"328\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3b17c9ae-2639-4ca1-bec2-885d45b00416\" />\n\n### Expected behavior\n\nPage `http://localhost:5173/` should response every savings.\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 11 10.0.26100\n CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-13700K\n Memory: 2.93 GB / 8.58 GB\nBinaries:\n Node: 22.17.1 - C:\\Program Files\\nodejs\\node.EXE\n npm: 11.4.2 - C:\\Program Files\\nodejs\\npm.CMD\nBrowsers:\n Edge: Chromium (139.0.3405.86)\nnpmPackages:\n vitepress: ^2.0.0-alpha.10 => 2.0.0-alpha.10\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.",[],4909,"hmr update only works once in version 2.0.0-alpha.10","2025-08-14T05:08:24Z","https://github.com/vuejs/vitepress/issues/4909",0.702019,{"description":3184,"labels":3185,"number":3187,"owner":3149,"repository":3150,"state":3151,"title":3188,"updated_at":3189,"url":3190,"score":3191},"### Describe the bug\r\n\r\nIn short, after modifying .vitepress/config.js, the hot update is not triggered\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nOur package.json\r\n\r\n```json\r\n{\r\n \"name\": \"wiki\",\r\n \"version\": \"1.0.1\",\r\n \"main\": \"index.js\",\r\n \"private\": true,\r\n \"scripts\": {\r\n \"dev\": \"vitepress dev\",\r\n \"build\": \"vitepress build\",\r\n \"serve\": \"vitepress serve\"\r\n },\r\n \"devDependencies\": {\r\n \"markdown-it-disable-url-encode\": \"^1.0.1\",\r\n \"prettier\": \"^2.3.2\",\r\n \"vite-plugin-components\": \"^0.13.2\",\r\n \"vite-plugin-icons\": \"^0.6.3\",\r\n \"vite-plugin-windicss\": \"^1.2.7\",\r\n \"vitepress\": \"^0.16.1\",\r\n \"windicss\": \"^3.1.7\"\r\n },\r\n \"dependencies\": {\r\n \"@iconify/json\": \"^1.1.391\",\r\n \"@vueuse/core\": \"^6.0.0\"\r\n }\r\n}\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\n更新 config.js 之后能够自动热更新\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Windows 10 10.0.19043\r\n CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz\r\n Memory: 31.43 GB / 63.87 GB\r\n Binaries:\r\n Node: 14.17.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.11 - C:\\Program Files\\nodejs\\yarn.CMD\r\n npm: 6.14.13 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.78)\r\n Internet Explorer: 11.0.19041.906\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/coc)\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.",[3186],{"name":3168,"color":3169},372,"hmr does not take effect for config.js","2023-01-21T16:20:30Z","https://github.com/vuejs/vitepress/issues/372",0.706926,{"description":3193,"labels":3194,"number":3196,"owner":3149,"repository":3150,"state":3151,"title":3197,"updated_at":3198,"url":3199,"score":3200},"### Describe the bug\n\n```\r\n▶ yarn build:docs\r\nyarn run v1.22.10\r\n$ vitepress build docs\r\nvitepress v0.15.6\r\nvite v2.4.1\r\n✓ building client + server bundles...\r\n⠋ rendering pages...\r\n✖ rendering pages...\r\nbuild error:\r\n TypeError: Cannot read property 'imports' of undefined\r\n at resolvePageImports (x/node_modules/vitepress/dist/node/build/render.js:81:22)\r\n at Object.renderPage (x/node_modules/vitepress/dist/node/build/render.js:35:12)\r\n at async Object.build (x/node_modules/vitepress/dist/node/build/build.js:29:17)\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\nhttps://github.com/vuejs/vitepress/blob/master/src/node/build/render.ts#L115\r\n\n\n### Reproduction\n\n``` bash\r\ncd docs\r\nln -s ../CHANGELOG.md changelog.md\r\nln -s ../packages components \r\n```\n\n### Expected behavior\n\n`build` success same as `dev`\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 11.4\r\n CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz\r\n Memory: 710.10 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 14.17.0 - /usr/local/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 6.14.13 - /usr/local/bin/npm\r\n Watchman: 4.9.0 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 91.0.4472.164\r\n Edge: 81.0.416.77\r\n Firefox: 87.0\r\n Safari: 14.1.1\r\n Safari Technology Preview: 15.0\r\n npmPackages:\r\n vitepress: ^0.15.6 => 0.15.6\n```\n\n\n### Additional context\n\nThe following code works fine\r\n```\r\n return Array.from(new Set([\r\n ...indexChunk.imports,\r\n ...indexChunk.dynamicImports,\r\n ...(pageChunk?.imports|| []),\r\n ...(pageChunk?.dynamicImports || [])\r\n ].filter(Boolean)));\r\n```\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.",[3195],{"name":3168,"color":3169},335,"build failed with symbolic links","2023-01-21T16:20:24Z","https://github.com/vuejs/vitepress/issues/335",0.70716846,{"description":3202,"labels":3203,"number":3205,"owner":3149,"repository":3150,"state":3151,"title":3206,"updated_at":3207,"url":3208,"score":3209},"### Describe the bug\n\nI added two markdown plugins to my Vitepress, which are [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote) and [markdown-it-task-checkbox](https://github.com/linsir/markdown-it-task-checkbox).\r\n\r\nThe imported code is located at `docs/.vitepress/config.ts`.\r\n\r\n```ts\r\nimport { defineConfig } from 'vitepress'\r\nimport nav from '../nav'\r\nimport sidebar from '../sidebar'\r\nconst footnote = require('markdown-it-footnote')\r\nconst taskLists = require('markdown-it-task-checkbox')\r\n```\r\n\r\nHowever, it was working normally in vitepress 1.0.0 beta5, but in vitepress 1.0.0-rc.4, `pnpm dev` is no longer working properly.\r\n\r\nI have checked the documentation for these two plugins, but neither of them has informed me how to use 'import' to import. It seems that importing with 'import' is not supported?\r\n\r\nI don't know how to solve this problem, and I hope to get some help. Thank you very much!\n\n### Reproduction\n\nnull\n\n### Expected behavior\n\nI hope Vitepress can run normally.\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.5\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 7.17 GB / 32.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.16.0 - ~/Library/pnpm/node\r\n npm: 9.5.1 - ~/Library/pnpm/npm\r\n pnpm: 8.6.3 - ~/Library/pnpm/pnpm\r\n Browsers:\r\n Chrome: 115.0.5790.170\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```bash\r\nmyblog_vitepress on main [!] is 📦 2.0.7 via ⬢ v18.16.0 \r\n➜ pm dev\r\n\r\n> vitepress@2.0.7 dev /Users/bddxg/Documents/coding/web/myblog_vitepress\r\n> vitepress dev docs --open\r\n\r\n✘ [ERROR] \"vitepress\" resolved to an ESM file. ESM file cannot be loaded by `require`. See http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details. [plugin externalize-deps]\r\n\r\n node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1363:27:\r\n 1363 │ let result = await callback({\r\n ╵ ^\r\n\r\n at file:///Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/vite@4.4.9_@types+node@18.15.11/node_modules/vite/dist/node/chunks/dep-df561101.js:66190:35\r\n at requestCallbacks.on-resolve (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1363:28)\r\n at handleRequest (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:726:19)\r\n at handleIncomingPacket (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:748:7)\r\n at Socket.readFromStdout (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:676:7)\r\n at Socket.emit (node:events:513:28)\r\n at addChunk (node:internal/streams/readable:324:12)\r\n at readableAddChunk (node:internal/streams/readable:297:9)\r\n at Readable.push (node:internal/streams/readable:234:10)\r\n at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)\r\n\r\n This error came from the \"onResolve\" callback registered here:\r\n\r\n node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1282:20:\r\n 1282 │ let promise = setup({\r\n ╵ ^\r\n\r\n at setup (file:///Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/vite@4.4.9_@types+node@18.15.11/node_modules/vite/dist/node/chunks/dep-df561101.js:66158:27)\r\n at handlePlugins (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1282:21)\r\n at buildOrContextImpl (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:971:5)\r\n at Object.buildOrContext (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:779:5)\r\n at /Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:2166:15\r\n at new Promise (\u003Canonymous>)\r\n at Object.build (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:2165:25)\r\n at build (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:2014:51)\r\n at bundleConfigFile (file:///Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/vite@4.4.9_@types+node@18.15.11/node_modules/vite/dist/node/chunks/dep-df561101.js:66109:26)\r\n\r\n The plugin \"externalize-deps\" was triggered by this import\r\n\r\n docs/.vitepress/config.ts:1:395:\r\n 1 │ ...Users/bddxg/Documents/coding/web/myblog_vitepress/docs/.vitepress/config.ts\";import { defineConfig } from 'vitepress'\r\n ╵ ~~~~~~~~~~~\r\n\r\nfailed to load config from /Users/bddxg/Documents/coding/web/myblog_vitepress/docs/.vitepress/config.ts\r\nfailed to start server. error:\r\nError: Build failed with 1 error:\r\nnode_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1363:27: ERROR: [plugin: externalize-deps] \"vitepress\" resolved to an ESM file. ESM file cannot be loaded by `require`. See http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.\r\n at failureErrorWithLog (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1639:15)\r\n at /Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1051:25\r\n at runOnEndCallbacks (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1474:45)\r\n at buildResponseToResult (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1049:7)\r\n at /Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:1078:16\r\n at responseCallbacks.\u003Ccomputed> (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:700:9)\r\n at handleIncomingPacket (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:755:9)\r\n at Socket.readFromStdout (/Users/bddxg/Documents/coding/web/myblog_vitepress/node_modules/.pnpm/esbuild@0.18.11/node_modules/esbuild/lib/main.js:676:7)\r\n at Socket.emit (node:events:513:28)\r\n at addChunk (node:internal/streams/readable:324:12)\r\n ELIFECYCLE Command failed with exit code 1.\r\n```\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.",[3204],{"name":3168,"color":3169},2805,"md plugin is imported using require and it seems that import cannot be used.","2023-08-27T00:06:20Z","https://github.com/vuejs/vitepress/issues/2805",0.7072832,{"description":3211,"labels":3212,"number":3216,"owner":3149,"repository":3150,"state":3151,"title":3217,"updated_at":3218,"url":3219,"score":3220},"### Describe the bug\n\nStart the service (npm run docs:dev), modify Markdown, and view the results in real time, but there seems to be a problem after rendering, as shown in the video.\r\n\r\n[video](https://youtu.be/3DDyb4uh3j0)\r\n\r\n\r\n\r\n\n\n### Reproduction\n\n1. npm run docs:dev\r\n2. modify markdown\r\n3. view results\r\n4. HMR reload html\r\n5. **The content is rendered repeatedly**\r\n\n\n### Expected behavior\n\nHMR updates the content normally\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 10.15.7\r\n CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz\r\n Memory: 91.06 MB / 16.00 GB\r\n Shell: 5.7.1 - /bin/zsh\r\n Binaries:\r\n Node: 12.22.2 - /usr/local/opt/node@12/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 6.14.13 - /usr/local/opt/node@12/bin/npm\r\n Browsers:\r\n Chrome: 91.0.4472.114\r\n Safari: 14.1.1\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.",[3213],{"name":3214,"color":3215},"need more info","bdbefc",333,"HMR seems to be a bit of an anomaly","2023-01-21T16:20:23Z","https://github.com/vuejs/vitepress/issues/333",0.71229345,{"description":3222,"labels":3223,"number":3225,"owner":3149,"repository":3150,"state":3151,"title":3226,"updated_at":3227,"url":3228,"score":3229},"### Describe the bug\r\nWhen change code Tsx file and save, hmr not support hot update watch.\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nnull\r\n\r\n### Expected behavior\r\n\r\nSupport Jsx / Tsx HMR \r\n\r\n### System Info\r\n\r\n```shell\r\nnull\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.",[3224],{"name":3214,"color":3215},1985,"[VuePress HMR] Not Support Hot Update Jsx / Tsx code","2023-03-18T00:04:25Z","https://github.com/vuejs/vitepress/issues/1985",0.71484864,{"description":3231,"labels":3232,"number":3234,"owner":3149,"repository":3150,"state":3151,"title":3235,"updated_at":3236,"url":3237,"score":3238},"### Describe the bug\n\nWhen I import something from vitepress in markdown files with a custom theme and then run `pnpm build`, I get the following warning:\r\n\r\n\u003Csamp>\r\nExport \"Content\" of module \"node_modules/.pnpm/vitepress@1.0.0-rc.4_search-insights@2.7.0/node_modules/vitepress/dist/client/app/components/Content.js\" was reexported through module \"node_modules/.pnpm/vitepress@1.0.0-rc.4_search-insights@2.7.0/node_modules/vitepress/dist/client/index.js\" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\r\nEither change the import in \".vitepress/theme/Layout.vue\" to point directly to the exporting module or reconfigure \"output.manualChunks\" to ensure these modules end up in the same chunk.\r\n\u003C/samp>\n\n### Reproduction\n\nThe file structure is the following:\r\n\r\n- `.vitepress/config.js`:\r\n\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\nexport default defineConfig({\r\n lang: 'en-US',\r\n title: 'VitePress',\r\n cleanUrls: true,\r\n})\r\n```\r\n\r\n- `.vitepress/theme/index.js`:\r\n\r\n```js\r\nimport Layout from './Layout.vue'\r\nexport default { Layout }\r\n```\r\n\r\n- `.vitepress/theme/Layout.vue`:\r\n\r\n```vue\r\n\u003Cscript setup>\r\nimport { Content } from 'vitepress'\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003CContent />\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.",[3233],{"name":3168,"color":3169},2856,"Imports from vitepress in markdown files lead to reexport warning","2023-09-03T00:04:43Z","https://github.com/vuejs/vitepress/issues/2856",0.71686786,["Reactive",3240],{},["Set"],["ShallowReactive",3243],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fkicVO1GMAKO6j2jzDBOmO7gPcpoT5a01yQ_THX6DTYA":-1},"/vuejs/vitepress/117"]