\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.",[2916],{"name":2868,"color":2869},2856,"Imports from vitepress in markdown files lead to reexport warning","2023-09-03T00:04:43Z","https://github.com/vuejs/vitepress/issues/2856",0.69117504,{"description":2923,"labels":2924,"number":2926,"owner":2871,"repository":2872,"state":2873,"title":2927,"updated_at":2928,"url":2929,"score":2930},"### Describe the bug\r\n\r\nHi, I am trying to import and use a custom Markdown renderer inside a component but it looks like the `createMarkdownRenderer` function is not exported.\r\n\r\n```\r\nUncaught SyntaxError: The requested module '/@fs/Users/xyz/.github/xyz/node_modules/vitepress/dist/client/index.js?v=61ac765b' does not provide an export named 'createMarkdownRenderer' (at EndpointExample.vue:2:10)\r\n```\r\n\r\nHowever, according to TypeScript types exported from VitePress, `createMarkdownRenderer` should be available for use.\r\n\r\n### Reproduction\r\n\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { createMarkdownRenderer } from \"vitepress\";\r\n\r\nconst props = defineProps\u003C{\r\n requests: { type: string; content: string; }[];\r\n response: string;\r\n}>();\r\n\r\n// `createMarkdownRenderer` is not exported from vitepress.\r\nconst md = await createMarkdownRenderer(\".\");\r\nconst response = md.render(props.response);\r\n\u003C/script>\r\n```\r\n\r\n### Expected behavior\r\n\r\nThe function `createMarkdownRenderer` should be exported as it is available from TypeScript types. If it should not, then remove the `createMarkdownRenderer` type export.\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 12.6\r\n CPU: (8) arm64 Apple M1 Pro\r\n Memory: 116.75 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node\r\n Yarn: 1.22.19 - ~/.yarn/bin/yarn\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm\r\n Browsers:\r\n Brave Browser: 108.1.46.144\r\n Chrome: 108.0.5359.124\r\n Firefox: 103.0.2\r\n Safari: 16.0\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nPlease note that I am trying to create a custom `markdownRenderer` so that I can create a code render from my component props.\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.",[2925],{"name":2868,"color":2869},1752,"The requested module does not provide an export named 'createMarkdownRenderer'","2023-01-21T14:16:58Z","https://github.com/vuejs/vitepress/issues/1752",0.69178385,{"description":2932,"labels":2933,"number":2935,"owner":2871,"repository":2872,"state":2873,"title":2936,"updated_at":2937,"url":2938,"score":2939},"### 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.",[2934],{"name":2868,"color":2869},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.6946863,{"description":2941,"labels":2942,"number":2943,"owner":2871,"repository":2872,"state":2873,"title":2944,"updated_at":2945,"url":2946,"score":2947},"### Describe the bug\n\n\r\n\r\n我的组件库是基于element ui 二次封装 正常打包 且在项目内可以使用\r\n在使用vitepress 开发文档时 运行无任何问题,能正常显示组件\r\n可是打包一堆问题\r\n\n\n### Reproduction\n\n使用element 封装 打包 嵌入vitepress\r\n\n\n### Expected behavior\n\n预期打包成功\n\n### System Info\n\n```shell\nTypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension \".css\" for /Users/allen/Desktop/ode/turborepo/node_modules/.pnpm/registry.npmmirror.com+element-plus@2.2.17_vue@3.2.40/node_modules/element-plus/theme-chalk/el-cascader.css\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.",[],1465,"vitepress 打包错误","2023-01-21T14:23:01Z","https://github.com/vuejs/vitepress/issues/1465",0.69613975,{"description":2949,"labels":2950,"number":2952,"owner":2871,"repository":2872,"state":2873,"title":2953,"updated_at":2954,"url":2955,"score":2956},"### Describe the bug\r\n\r\nI'm documenting some ember addon. Ember and Vue use double curly syntax. Here is my markdown snippet that currently has a parser error:\r\n\r\n```md\r\nThus, a code such as `{{on \"click\" inc}}` would break as Ember is not able to make that association.\r\n```\r\n\r\nWhich fails with the error message:\r\n\r\n```\r\n[plugin:vite:vue] Error parsing JavaScript expression: Unexpected token, expected \",\" (1:4)\r\n```\r\n\r\nHere the screenshot of the error message. The extracted code snippet is actually not the real reason - I guess the parser is confused here.\r\n\r\n\u003Cimg width=\"886\" alt=\"Bildschirmfoto 2023-10-07 um 11 48 42\" src=\"https://github.com/vuejs/vitepress/assets/283700/6e1ec7a3-92e5-4537-856e-57813de3227c\">\r\n\r\n### Reproduction\r\n\r\nEnter the snippet above into any markdown file and vitepress will show the error.\r\n\r\n### Expected behavior\r\n\r\nWithin code backticks, I'd expect vitepress not trying to execute vue code.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\r\n Memory: 11.69 MB / 16.00 GB\r\n Shell: 3.6.1 - /usr/local/bin/fish\r\n Binaries:\r\n Node: 18.16.0 - ~/.volta/tools/image/node/18.16.0/bin/node\r\n Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn\r\n npm: 9.5.1 - ~/.volta/tools/image/node/18.16.0/bin/npm\r\n pnpm: 8.8.0 - ~/.volta/bin/pnpm\r\n Watchman: 2023.08.14.00 - /usr/local/bin/watchman\r\n Browsers:\r\n Brave Browser: 103.1.41.100\r\n Chrome: 117.0.5938.149\r\n Edge: 117.0.2045.47\r\n Safari: 16.5.2\r\n npmPackages:\r\n vitepress: ^1.0.0-rc.20 => 1.0.0-rc.20\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.",[2951],{"name":2868,"color":2869},3053,"Markdown Parser fails with `{{`","2023-10-15T00:04:48Z","https://github.com/vuejs/vitepress/issues/3053",0.6965773,["Reactive",2958],{},["Set"],["ShallowReactive",2961],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fJQNfqsl7dhPOKDeXVLYIajhSuIAzEkTjLw57Z2553nE":-1},"/vuejs/vitepress/2046"]