\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.",[3033],{"name":3034,"color":3035},"bug: pending triage","e99695",2856,"closed","Imports from vitepress in markdown files lead to reexport warning","2023-09-03T00:04:43Z","https://github.com/vuejs/vitepress/issues/2856",0.6155131,{"description":3043,"labels":3044,"number":3046,"owner":3023,"repository":3024,"state":3037,"title":3047,"updated_at":3048,"url":3049,"score":3050},"### Describe the bug\n\nAn error occurred while building with `vitepress@1.0.0-alpha.13` (`vite@3.1.0`) and `ant-design-vue` **(dev working!)**\r\n> SyntaxError: Cannot use import statement outside a module\r\n\r\n\r\n\n\n### Reproduction\n\n# Steps:\r\n1. create a new project\r\n2. register a custom component `custom-button`\r\n3. use the `custom-button` in `index.md`\r\n4. building with vitepress\r\n\r\nReproduction repo: \r\nhttps://github.com/yeojongki/vitepress-cannot-use-import-statement-outside-a-module `(cd docs && pnpm i && pnpm build)`\r\n\n\n### Expected behavior\n\nsuccess build\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz\r\n Memory: 12.70 GB / 31.97 GB\r\n Binaries:\r\n Node: 16.13.0 - E:\\nodejs\\node.EXE\r\n Yarn: 1.22.17 - E:\\nodejs\\yarn.CMD\r\n npm: 8.1.3 - E:\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.27)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.13 => 1.0.0-alpha.13\n```\n\n\n### Additional context\n\nrelative issue https://github.com/vuejs/vitepress/issues/324, but closed\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.",[3045],{"name":3034,"color":3035},1329,"SyntaxError: Cannot use import statement outside a module","2023-01-21T14:25:25Z","https://github.com/vuejs/vitepress/issues/1329",0.6362947,{"description":3052,"labels":3053,"number":3055,"owner":3023,"repository":3024,"state":3037,"title":3056,"updated_at":3057,"url":3058,"score":3059},"### Describe the bug\n\nall auto import components in dev mode is ok.\nall auto import components in build mode is ok, when there have no 'script' tag in md files\n\nif md file have 'script' tag of one page. the page's auto import component will not resolve in **build mode**!!!!\n\n### Reproduction\n\nit's an empty vitepress project.\n\n[Reproduction URL](https://github.com/huchaomin/vitepress-auto-import-bug)\n\n### Expected behavior\n\n\u003Cimg width=\"900\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/76a803ce-949b-4ae2-b229-32484d930cde\" />\n\n\u003Cimg width=\"821\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d4b60aea-4b7c-422f-8c0e-339be12dbe42\" />\n\n\u003Cimg width=\"901\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/691bb9b3-a61d-4f15-8426-68416f7340da\" />\n\n\u003Cimg width=\"915\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9c8470cc-7c45-476a-aaf1-3f990a1c57f0\" />\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 11 10.0.22631\n CPU: (28) x64 Intel(R) Core(TM) i7-14700KF\n Memory: 15.99 GB / 31.82 GB\n Binaries:\n Node: 20.17.0 - D:\\Program Files\\nodejs\\node.EXE\n npm: 10.8.2 - D:\\Program Files\\nodejs\\npm.CMD\n pnpm: 9.8.0 - D:\\Program Files\\nodejs\\pnpm.CMD\n Browsers:\n Edge: Chromium (127.0.2651.74)\n Internet Explorer: 11.0.22621.3527\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\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.",[3054],{"name":3034,"color":3035},4519,"\"vitepress\" work with \"unplugin-vue-components\" bug","2025-02-02T04:41:47Z","https://github.com/vuejs/vitepress/issues/4519",0.6415881,{"description":3061,"labels":3062,"number":3064,"owner":3023,"repository":3024,"state":3037,"title":3065,"updated_at":3066,"url":3067,"score":3068},"### 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.",[3063],{"name":3034,"color":3035},335,"build failed with symbolic links","2023-01-21T16:20:24Z","https://github.com/vuejs/vitepress/issues/335",0.6475838,{"description":3070,"labels":3071,"number":3075,"owner":3023,"repository":3024,"state":3037,"title":3076,"updated_at":3077,"url":3078,"score":3079},"### Describe the bug\r\n\r\nTrying to use `const articles = import.meta.glob('../*.js')` within config.js will give you an error.\r\n\r\n```\r\nfailed to load config from /**/docs/.vitepress/config.js\r\n```\r\n\r\n### Reproduction\r\n\r\nadd `const articles = import.meta.glob('../*.js')` to config.js\r\n\r\n### Expected behavior\r\n\r\nIt would be nice to be able to build a dynamic sidebar based on files you load from a directory.\r\n\r\n### System Info\r\n\r\n```shell\r\nosx, new build of vitepress as of today\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nSince, `require(\"fs\");` and `require(\"path\")` dont work with vite, how else might I analyze the file system to build my sidebar?\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.",[3072],{"name":3073,"color":3074},"build","377ba8",572,"Make import.meta work in .vitepress/config.js","2023-01-21T14:32:52Z","https://github.com/vuejs/vitepress/issues/572",0.650232,{"description":3081,"labels":3082,"number":3084,"owner":3023,"repository":3024,"state":3037,"title":3085,"updated_at":3086,"url":3087,"score":3088},"### Describe the bug\n\nmd file can't use import @vicons/antd\r\n\r\n**My Code**\r\n:::demo\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cwp-icon name=\"DeleteOutlined\">\u003C/wp-icon>\r\n\u003C/template>\r\n\r\n\u003Cscript lang=\"ts\" setup>\r\nimport {RightOutlined} from '@vicons/antd';\r\n\u003C/script>\r\n```\r\n:::\r\n\r\n\r\n\r\n**Browser Error**\r\n\r\n\n\n### Reproduction\n\nmd file use import\n\n### Expected behavior\n\nmd file can use import node_modules package\n\n### System Info\n\n```shell\n\"vitepress\": \"1.0.0-alpha.4\"\r\n\"@vicons/antd\": \"^0.11.0\"\r\n\"vite\": \"^2.9.0\"\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.",[3083],{"name":3034,"color":3035},922,"md file can't use import external resources","2023-01-21T14:32:45Z","https://github.com/vuejs/vitepress/issues/922",0.65313596,{"description":3090,"labels":3091,"number":3093,"owner":3023,"repository":3024,"state":3037,"title":3094,"updated_at":3095,"url":3096,"score":3097},"### Describe the bug\r\n\r\nUsing Monaco Editor (applying **[this trick](https://github.com/vuejs/vitepress/issues/1508)**) works with `npm run docs:dev` but is failing with `npm run docs:build`\r\n\r\nIn other words, Monaco Editor works in dev but fails in build. The is **not** related to imports ([ex1](https://github.com/vuejs/vitepress/issues/1508), [ex2](https://github.com/vitejs/vite/discussions/1791#discussioncomment-321046, [ex3](https://twitter.com/youyuxi/status/1355316139144970240?s=20))\r\n\r\nThe error when building reads is about module_not_found (the package is definitely installed & path exists):\r\n\r\n```\r\nError [ERR_MODULE_NOT_FOUND]: Cannot find package '/home/projects/nbwixzanm.github/node_modules/monaco-editor/' imported from /home/projects/nbwixzanm.github/.vitepress/.temp/....\r\n```\r\n\r\nStackblitz:\r\n\u003Cimg width=\"1040\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/1396559/1ce6110a-4d0e-4160-a1df-9148f778ebe3\">\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/valgaze/vitepress-monaco#setup\r\n\r\nhttps://stackblitz.com/github/valgaze/vitepress-monaco # npm run docs:build\r\n\r\n### Expected behavior\r\n\r\nMonaco Editor should be able to build/bundle and find its folder that exists\r\n\r\n### System Info\r\n\r\n```sh\r\nSystem:\r\n OS: macOS 12.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 139.38 MB / 16.00 GB\r\n Shell: 3.2.57 - /bin/bash\r\n Binaries:\r\n Node: 18.11.0 - ~/.nvm/versions/node/v18.11.0/bin/node\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.11.0/bin/npm\r\n Browsers:\r\n Brave Browser: 114.1.52.122\r\n Chrome: 116.0.5845.96\r\n Firefox: 105.0.3\r\n Safari: 15.2\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.4 => 1.0.0-rc.4\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.",[3092],{"name":3034,"color":3035},2832,"Monaco-editor + Vitepress not found on 1.0.0-rc.4 when building?","2023-08-31T00:04:23Z","https://github.com/vuejs/vitepress/issues/2832",0.6594953,{"description":3099,"labels":3100,"number":3102,"owner":3023,"repository":3024,"state":3037,"title":3103,"updated_at":3104,"url":3105,"score":3106},"### Describe the bug\r\n\r\nThere is no problem in the development environment, but an error was thrown during packaging execution\r\n\u003Cimg width=\"1320\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/142566415/3a33fbd2-7d53-4bee-b0d0-db8ded2b047d\">\r\n\r\n### Reproduction\r\n\r\nFor development - npm run docs:dev\r\nFor build - npm run docs:build\r\n\r\nEquivalent stackblitz links:\r\n[https://stackblitz.com/edit/vite-dkrbry](https://stackblitz.com/edit/vite-dkrbry)\r\n\r\n### Expected behavior\r\n\r\nProduction should match with development.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 18.18.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.4.2 - /usr/local/bin/npm\r\n npmPackages:\r\n vitepress: latest => 1.0.0-rc.35\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.",[3101],{"name":3034,"color":3035},3425," XXX is not supported resolving ES modules imported from XXX","2024-01-18T00:04:43Z","https://github.com/vuejs/vitepress/issues/3425",0.6633153,{"description":3108,"labels":3109,"number":3111,"owner":3023,"repository":3024,"state":3037,"title":3112,"updated_at":3113,"url":3114,"score":3115},"### Describe the bug\n\nineed sidebar infomation so i use `import { useSidebar } from 'vitepress/theme';`\nin version 2.0.0-alpha.6 when build \ntrigger error \n\n`build error:\nmap.md?vue&type=script&setup=true&lang.ts (6:9): \"useSidebar\" is not exported by \"node_modules/.pnpm/vitepress@2.0.0-alpha.6_@al_c8ebdc7df104d5a78f582589290932f9/node_modules/vitepress/dist/client/theme-default/index.js\", imported by \"map.md?vue&type=script&setup=true&lang.ts\".\n`\n\n### Reproduction\n\nimport { useSidebar } from 'vitepress/theme';\n\n### Expected behavior\n\nwork\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 11 10.0.22000\n CPU: (8) x64 Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz\n Memory: 6.27 GB / 31.87 GB\n Binaries:\n Node: 22.15.0 - D:\\Program Files\\nodejs\\node.EXE\n npm: 10.9.2 - D:\\Program Files\\nodejs\\npm.CMD\n pnpm: 10.10.0 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\n Browsers:\n Edge: Spartan (44.22000.120.0), Chromium (135.0.3179.98)\n Internet Explorer: 11.0.22000.120\n npmPackages:\n vitepress: 2.0.0-alpha.6 => 2.0.0-alpha.6\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.",[3110],{"name":3034,"color":3035},4789,"useSidebar\" is not exported by","2025-06-17T03:08:15Z","https://github.com/vuejs/vitepress/issues/4789",0.6642166,["Reactive",3117],{},["Set"],["ShallowReactive",3120],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fVtqxyp1zM2CoZa34TbN0zlU7EU4xwijFydgnGli0lsg":-1},"/vuejs/vitepress/2805"]