/, true],\r\n // custom elements with hyphens\r\n [/^\u003C\\w+\\-/, />/, true],\r\n]\r\n```\r\n\r\nThe intent here is to mark the opening and closing of scope for a component but as you can see from the RegEx it is only looking for inline components not block components!\r\n\r\nFor example, the component `p-table` has several named slots which help it to render the way the user intends:\r\n\r\n```html\r\n\u003Cp-table>\r\n \r\n \u003Ctemplate #name=\"{ row }\">\r\n {{ row.name }}\r\n \u003C/template>\r\n\r\n \u003Ctemplate #age=\"{ row }\">\r\n {{ row.age }}\r\n \u003C/template>\r\n\r\n\u003C/p-table>\r\n```\r\n\r\nPut this into the template section of a Vue CLI app and it works just fine. Put it into Vuepress or Vitepress and watch the cloud of smoke start to rise as it fumbles around; particularly failing on the `#` symbols used as shorthand for named slots. This is particularly troublesome for a documentation site that is trying to document a set of VueJS components! There should be a way to ensure that this VueJS component's interior scope is left untouched by **Markdown-it** ... at least when that's what you want. \r\n\r\nThere is a second use-case that I would expect Vitepress to just handle and that is _kind of_ what it's doing today but in a hit and miss fashion currently. Let's say that I just have a default slot in my component and therefore I want my component to be seen by the Markdown engine as being an \"inline\" component and process the interior as markdown. Great, then the following should work:\r\n\r\n```md\r\n\u003Csuper-sexy>\r\n# some heading\r\n## some sub heading\r\n\u003C/super-sexy>\r\n```\r\n\r\nThis would just provide some HTML wrapper elements that would in this case make this very dull markdown sexy.\r\n\r\nFinally there is a third use-case that really should be considered required too ... this is the hybrid but it will allow for all sorts of simple but useful documentation components. The use-case presents as a component that exposes named slots -- and therefore is seen by Markdown as a block component -- but these named slots _are_ processed by markdown. An obvious example might be a `\u003Ctwo-columns>` component which provides a `left` and `right` slot and allows authors to more readily leverage their horizontal space.\r\n\r\nImagine the following:\r\n\r\n```html\r\n\u003Ctwo-columns>\r\n\r\n \u003Ctemplate #left>\r\n I'm a lumberjack and I'm ok\r\n \u003C/template>\r\n \u003Ctemplate #right>\r\n I sleep all night and I work all day\r\n \u003C/template>\r\n\r\n\u003C/two-columns>\r\n```\r\n \r\nThis will fail miserably today but it _could_ be grand!\r\n\r\n** Proposed Solution **\r\n\r\nRework the `src/node/markdown/plugins/components.ts` file in Vitepress (same change can be applied to Vuepress) to:\r\n\r\n- use more sophisticated RegEx patterns to actually capture BLOCK content not just inline components\r\n- support two modes of processing for BLOCK VueJS components: \r\n\r\n 1. Isolated - the interior scope is _not_ processed as markdown and all registered VueJS components can operate exactly like they would normally do\r\n 2. Parsed - the interior scope is processed as markdown; this will work well for default slots where the interior content is Markdown content\r\n\r\n- the Isolated mode should be seen as the _default_ as it is more powerful and allows components that work outside the context of Vitepress/Vuepress to just work here as well\r\n- the parsed mode may be popular for components designed strictly for Vitepress and Vuepress and it could be opted into in the HTML template like so:\r\n\r\n ```html\r\n \u003Cmy-crazy-idea parsed>There I was, _there I was_, in the Congo\u003C/my-crazy-idea>\r\n ```\r\n\r\nThis solution so far could pretty easily support the first two use cases which is a big step forward. The third use-case would certainly be nice but would need a bit more thought. I could imagine something as simple as adding the `md` prop to the parent component being used as a means to pass in the Markdownit object into the top-level component so it could chain the rendering into the various named slots:\r\n\r\n ```html\r\n \u003Cmy-crazy-idea md>\r\n \u003Ctemplate #left>\r\n There I was, _there I was_, \r\n \u003Ctemplate #right>\r\n I sleep all night and I work all day\r\n \u003C/template>\r\n \u003C/my-crazy-idea>\r\n ```\r\n\r\nIn all likelihood this last option should be done as an optional second step.\r\n",[],"Proper processing of Vue Component slot content","2023-01-21T14:28:50Z","https://github.com/vuejs/vitepress/issues/135",0.67133296,{"description":2924,"labels":2925,"number":2927,"owner":2871,"repository":2872,"state":2873,"title":2928,"updated_at":2929,"url":2930,"score":2931},"\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\nWhen I use the components directly in markdown file, It raised a waring with `vue.js:1099 [Vue warn]: Failed to resolve componen` as:\r\n\r\n\r\n\r\nDoes vitepress auto register components in `.vitepress/components`? or where can I put the `.vue` files and how to use them? thank you.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\n**Expected behavior**\r\nA clear and concise description of what you expected to happen.\r\n\r\n**System Info**\r\n- vitepress version:\r\n- vite version:\r\n- Node version:\r\n- OS version:\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[2926],{"name":2868,"color":2869},60,"Is vitepress auto register components in `.vitepress/components`?","2023-01-21T16:25:31Z","https://github.com/vuejs/vitepress/issues/60",0.67196995,{"description":2933,"labels":2934,"number":2936,"owner":2871,"repository":2872,"state":2873,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Describe the bug\n\nimport `svg` with plugin vite-svg-loader\r\nit's type should be `FunctionalComponent`\r\nthis is ok in vite projects\r\nbut not work in vitepress\r\nit's type is `String`\n\n### Reproduction\n\nhttps://github.com/x-wink/wink-ui\r\nthis is my repository\r\nthrow type error in this file: `docs\\src\\examples\\button\\use5.vue`\r\nit's ok in this file: `packages\\components\\select\\tag.vue`\n\n### Expected behavior\n\njust like vite projects\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 10 10.0.19045\r\n CPU: (24) x64 Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz\r\n Memory: 19.04 GB / 31.86 GB\r\n Binaries:\r\n Node: 18.16.0 - D:\\nodejs\\node.EXE\r\n npm: 9.5.1 - D:\\nodejs\\npm.CMD\r\n pnpm: 8.7.4 - ~\\AppData\\Local\\pnpm\\pnpm.CMD\r\n Browsers:\r\n Chrome: bookmarks.html\r\ninitial_preferences\r\n Edge: Chromium (116.0.1938.81)\r\n Internet Explorer: 11.0.19041.1566\n```\n\n\n### Additional context\n\nexists follow projects in my UI libary momorepo:\r\n- docs\r\n- icons\r\n- components\r\n- wink-ui\r\n\r\n`docs` is a vitepress project, dependencie `icons` and `components`\r\n`icons` is a vite project with plugin vite-svg-loader\r\n`components` define vue components and dependencie `icons`\r\n`wink-ui` is a vite project dependencie `components`, build and emits `components`\r\n\r\nI try to upgrade vitepress to latest version,it's same result.\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.",[2935],{"name":2900,"color":2901},2968,"Type error when use svg icon with plugin vite-svg-loader","2024-01-09T00:05:11Z","https://github.com/vuejs/vitepress/issues/2968",0.6732387,{"description":2942,"labels":2943,"number":2945,"owner":2871,"repository":2872,"state":2873,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Describe the bug\n\n\r\n\r\nhttps://github.com/vuejs/vitepress/blob/9004a801305fa0c21a0064253da95fbad38148fe/src/client/app/utils.ts#L38\r\n\r\nby \r\n\r\nhttps://github.com/vuejs/vitepress/blob/89cc718649b9be547c6ec08d2dc3d10a67f2a3ac/src/client/app/utils.ts#L38-L39\r\n\r\nshould fix this.\r\n\r\n_Originally posted by @brc-dd in https://github.com/vuejs/vitepress/issues/412#issuecomment-1149704365_\r\n \r\n\r\nI still have this problem\r\n\r\nvitepress version:1.0.0-alpha.26 or npm:@brc-dd/vitepress@1.0.0-dev.50d1202\r\n\r\nI try to configure `cleanUrls: 'with-subfolders'` or `cleanUrls:' without-subfolders'` or delete the cleanUrls configuration item makes no difference or is still reporting an error\r\n\r\nI will temporarily open my [repo](https://github.com/you-hengh/myblog_vitepress) to find bugs.\n\n### Reproduction\n\npackage.json\r\n```json\r\n{\r\n \"name\": \"vitepress\",\r\n \"version\": \"1.0.0\",\r\n \"description\": \"\",\r\n \"main\": \"index.js\",\r\n \"scripts\": {\r\n \"dev\": \"vitepress dev docs\",\r\n \"build\": \"vitepress build docs\",\r\n \"serve\": \"vitepress serve docs\"\r\n },\r\n \"keywords\": [],\r\n \"author\": \"\",\r\n \"license\": \"ISC\",\r\n \"devDependencies\": {\r\n \"@algolia/client-search\": \"^4.14.2\",\r\n \"vitepress\": \"npm:@brc-dd/vitepress@1.0.0-dev.50d1202\"\r\n }\r\n}\r\n```\r\n\r\n1. pnpm build\r\n\r\n ```bash\r\n > vitepress build docs\r\n\r\n vitepress v1.0.0-dev.50d1202\r\n ✓ building client + server bundles...\r\n ⠋ rendering pages...[Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n [Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n ✓ rendering pages...\r\n build complete in 3.35s.\r\n ```\r\n\r\n2. pnpm serve\r\n\r\n ```bash\r\n > vitepress@1.0.0 serve /Users/bddxg/Documents/网站/vitepress 站点\r\n > vitepress serve docs\r\n\r\n vitepress v1.0.0-dev.50d1202\r\n Built site served at http://localhost:4173/\r\n ```\r\n\r\n\n\n### Expected behavior\n\nfix bug or tell me the solution.\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 13.0\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 5.11 GB / 32.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.1 - ~/Library/pnpm/node\r\n npm: 8.15.0 - ~/Library/pnpm/npm\r\n Browsers:\r\n Chrome: 106.0.5249.119\r\n Safari: 16.1\r\n npmPackages:\r\n @brc-dd/vitepress: 1.0.0-dev.50d1202\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.",[2944],{"name":2868,"color":2869},1578,"vitepress serve tries to load an md.undefined.js file","2023-01-21T14:20:50Z","https://github.com/vuejs/vitepress/issues/1578",0.6734415,{"description":2951,"labels":2952,"number":2953,"owner":2871,"repository":2872,"state":2873,"title":2954,"updated_at":2955,"url":2956,"score":2957},"\r\n**Describe the bug**\r\nvitepress dev docs working but vitepress build docs has errors.\r\n\r\n```\r\n> vitepress dev docs\r\n\r\nvitepress v0.15.3\r\nvite v2.3.7\r\nD:\\vue3-openlayers\\docs\\.vitepress\\config.js\r\n\r\n vite v2.3.7 dev server running at:\r\n\r\n > Local: http://localhost:3000/\r\n > Network: use `--host` to expose\r\n[@vue/compiler-sfc] \u003Cscript setup> is still an experimental proposal.\r\nFollow its status at https://github.com/vuejs/rfcs/pull/227.\r\n\r\n[@vue/compiler-sfc] When using experimental features,\r\nit is recommended to pin your vue dependencies to exact versions to avoid breakage.\r\n```\r\n\r\n```\r\n> vitepress build docs\r\n\r\nvitepress v0.15.3\r\nvite v2.3.7\r\n⠧ building client + server bundles...\r\n(!) Some chunks are larger than 500kb after minification. Consider:\r\n- Using dynamic import() to code-split the application\r\n- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks\r\n- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.\r\n✓ building client + server bundles...\r\n✖ rendering pages...\r\nbuild error:\r\n D:\\vue3-openlayers\\node_modules\\ol\\Map.js:17\r\nimport CompositeMapRenderer from './renderer/Composite.js';\r\n^^^^^^\r\n\r\nSyntaxError: Cannot use import statement outside a module\r\n at wrapSafe (internal/modules/cjs/loader.js:1001:16)\r\n at Module._compile (internal/modules/cjs/loader.js:1049:27)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)\r\n at Module.load (internal/modules/cjs/loader.js:950:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:791:14)\r\n at Module.require (internal/modules/cjs/loader.js:974:19)\r\n at require (internal/modules/cjs/helpers.js:88:18)\r\n at Module.\u003Canonymous> (D:\\vue3-openlayers\\node_modules\\vitepress\\dist\\client\\app\\temp\\app.js:25:13)\r\n at Module._compile (internal/modules/cjs/loader.js:1085:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! vue3-openlayers@0.1.0 docs:build: `vitepress build docs`\r\nnpm ERR! Exit status 1\r\n```\r\n\r\n**Expected behavior**\r\n\r\nsuccess build\r\n\r\n**System Info**\r\n- vitepress version: ^0.15.3\r\n- vite version: 2.3.7\r\n- Node version: v14.13.0\r\n- OS version: win 10\r\n\r\n",[],324,"dev works but build not (Cannot use import statement outside a module)","2023-01-21T14:28:40Z","https://github.com/vuejs/vitepress/issues/324",0.67413616,["Reactive",2959],{},["Set"],["ShallowReactive",2962],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fQJwjSLz5fizuB2OaEt_9Fe6ensPxcyYHAuTqIVibMvU":-1},"/vuejs/vitepress/311"]