`)\r\n\r\nI'm currently working on migrating and documenting the excellent Spectre CSS docs and am using Vitepress.\r\n\r\nI'm developing an ejected and modified default theme which has already come some way to solving this problem:\r\n\r\n- [original](https://picturepan2.github.io/spectre/components/menu.html) (custom app)\r\n- [migrated](https://spectre-org.github.io/spectre-docs/docs/components/menu.html) (VitePress with modified default theme)\r\n - note the `vp-doc` formatting which is all Spectre CSS\r\n - some fixed, and some not-yet fixed clashes of general class names\r\n\r\nFor reference to the use case (documenting a 3rd-party framework) here is the raw markdown page:\r\n\r\n- https://raw.githubusercontent.com/spectre-org/spectre-docs/main/docs/components/menu.md\r\n\r\nNote that:\r\n\r\n- Spectre CSS (or any other 3rd-party CSS framework) is now able to be simply \"dropped in\"\r\n- there is no pollution between VitePress and the 3rd-party framework\r\n- VitePress' default components remain fully-styled and work as they were before\r\n- `vp-doc` content can be safely used to demo any 3rd party HTML elements and classes\r\n\r\nI think I know enough to fix the problems in my modified theme and either:\r\n\r\n- publish a new \"neutral\" theme\r\n- port the changes to the default theme (ideal outcome)\r\n\r\nThere's actually not that much work; it's:\r\n\r\n- renaming the general component classes\r\n- moving some `vp-doc` classes to other locations\r\n- creating an additional unstyled entrypoint such as `without-formatting`\r\n\r\n### Describe alternatives you've considered\r\n\r\nPublishing the modified theme standalone, but then of course it would not benefit from ongoing updates.\r\n\r\n### Additional context\r\n\r\nI am proposing a PR in the coming weeks to integrate these updates.\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.dev).\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.",[2867],{"name":2868,"color":2869},"stale","ededed",3021,"vuejs","vitepress","open","Make the default theme compatible with 3rd-party CSS frameworks","2023-11-06T14:43:58Z","https://github.com/vuejs/vitepress/issues/3021",0.6710252,{"description":2879,"labels":2880,"number":2881,"owner":2871,"repository":2872,"state":2882,"title":2883,"updated_at":2884,"url":2885,"score":2886},"i want use vitepress become a ui component display website. so i import my sfc in enhanceApp. But at meantime i must config my own `Layout.vue` and `notfound.vue` component. That is not what i want. i liked defaulte theme (vuepress old player) very mush. \r\n\r\n```js\r\nimport Layout from '/@theme/Layout.vue';\r\nimport Helloworld from \"../components/index\"\r\n\r\nexport default {\r\n Layout,\r\n // NotFound,\r\n enhanceApp({ app, router, siteData }) {\r\n app.use(Helloworld) \r\n }\r\n}\r\n```\r\n\r\ni think `@theme/index` should not config default layout and enhanceApp at same time or in the same file. or at least it must follow `Convention over configuration` rule.\r\n\r\nif follow [vuepress default theme file system](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/theme-default) and `Convention over configuration`, it will be better\r\n\r\nmaybe use `@theme/layouts/`, `@theme/components/`\r\n\r\nand here is a bug, when a create emptyfile `theme` in `.vitepress` .it will crash",[],58,"closed","want more flexibility in the customization part","2023-01-21T16:20:20Z","https://github.com/vuejs/vitepress/issues/58",0.6298912,{"description":2888,"labels":2889,"number":2890,"owner":2871,"repository":2872,"state":2882,"title":2891,"updated_at":2892,"url":2893,"score":2894},"Hi there,\r\n\r\nThe example in the documentation for customizing the theme does not work. It fails as the file/package cannot be found. This is the [specific line](https://github.com/vuejs/vitepress/blob/ea6cb00c3e9099d45fc236bff0f7c42a65d558dc/docs/guide/theming.md?plain=1#L97) that I am referring to, but I believe that the other lines that use this same thing will also fail.\r\n\r\nThe specific import that fails\r\n```javascript\r\nimport DefaultTheme from 'vitepress/theme'\r\n```\r\n\r\nI found an alternative import that works by looking into the downloaded node_module folder directly\r\n```javascript\r\nimport DefaultTheme from \"vitepress/dist/client/theme-default\";\r\n```\r\n\r\nIm not sure if this is the intended use or? If this is an actual issue, I can help with making a PR to update the docs, else if it is something that needs to be fixed with the deployment process so that the `DefaultTheme` can be exported from vitepress/theme then it would probably need help from someone else familiar with the process.\r\n\r\nThanks alot for your time!",[],442,"Example provided in theme documentation does not work","2023-01-21T16:20:15Z","https://github.com/vuejs/vitepress/issues/442",0.63869095,{"description":2896,"labels":2897,"number":2898,"owner":2871,"repository":2872,"state":2882,"title":2899,"updated_at":2900,"url":2901,"score":2902},"### Is your feature request related to a problem? Please describe.\n\nI'm working on a vitepress site that uses a custom theme. Some time ago, another contributor added local search to the site.\r\nHe did this by enabling search in the config and then importing the `VPNavBarSearch` from `vitepress/dist/client/theme-default/components/VPNavBarSearch.vue`\r\n\r\nThis works. However, I don't believe it's best practice. The thing that is particularly annoying is that it generates a bunch of typescript errors and I'm hoping to get my docs build to be typescript clean and enforce that. The typescript team seems adamantly against enabling the kind of error supression that would enable this scenario and reinforces the concept that they don't believe importing *.ts files (presumably this includes *.vue files with script = \"ts\") in this issue: https://github.com/microsoft/TypeScript/issues/40426\n\n### Describe the solution you'd like\n\nOne possible solution is for VitePress to export `VPNavBarSearch` and possibly other related components.\r\nI monkey patched vitepress to export the component `VPNavBarSearch` and then added it to the normal imports from vitepress e.g. `import { ..., VPNavBarSearch, ...} from 'vitepress'` to prove to myself that this works, including getting rid of the typescript error.\n\n### Describe alternatives you've considered\n\nThe other alternative I briefly explored was moving to use the default theme with customizations, but the default Layout doesn't do everything that I'd like, even with liberal use of the slots.\r\n\r\n(Most) of the reason the typescript is complaining is that I have noexplicit any set and it looks like vitepress doesn't, so it might be possible to make the vitepress components comply with stricter typescript config and have the direct import work, but I think this is a less desireable solution, since as noted above the typescript team doesn't believe this kind of import is best practice.\n\n### Additional context\n\nI've pasted the errors I'm seeing below. If you want to reproduce them:\r\n\r\nCreate a vitepress site with a custom theme and Layout.vue file\r\nAdd the line `import VPNavBarSearch from 'vitepress/dist/client/theme-default/components/VPNavBarSearch.vue`\r\n\r\n```\r\nnode_modules/vitepress/dist/client/theme-default/components/VPAlgoliaSearchBox.vue:6:25 - error TS7016: Could not find a declaration file for module '../composables/data'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/composables/data.js' implicitly has an 'any' type.\r\n\r\n6 import { useData } from '../composables/data'\r\n ~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:2:30 - error TS2307: Cannot find module '@localSearchIndex' or its corresponding type declarations.\r\n\r\n2 import localSearchIndex from '@localSearchIndex'\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:13:18 - error TS7016: Could not find a declaration file for module 'mark.js/src/vanilla.js'. 'C:/Projects/bootstrap-vue-next/node_modules/.pnpm/mark.js@8.11.1/node_modules/mark.js/src/vanilla.js' implicitly has an 'any' type.\r\n Try `npm i --save-dev @types/mark.js` if it exists or add a new declaration (.d.ts) file containing `declare module 'mark.js/src/vanilla.js';`\r\n\r\n13 import Mark from 'mark.js/src/vanilla.js'\r\n ~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:30:28 - error TS7016: Could not find a declaration file for module '../../app/utils'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/app/utils.js' implicitly has an 'any' type.\r\n\r\n30 import { pathToFile } from '../../app/utils'\r\n ~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:31:30 - error TS7016: Could not find a declaration file for module '../../shared'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/shared.js' implicitly has an 'any' type.\r\n\r\n31 import { escapeRegExp } from '../../shared'\r\n ~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:32:25 - error TS7016: Could not find a declaration file for module '../composables/data'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/composables/data.js' implicitly has an 'any' type.\r\n\r\n32 import { useData } from '../composables/data'\r\n ~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:33:26 - error TS7016: Could not find a declaration file for module '../support/lru'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/support/lru.js' implicitly has an 'any' type.\r\n\r\n33 import { LRUCache } from '../support/lru'\r\n ~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:34:39 - error TS7016: Could not find a declaration file for module '../support/translation'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/support/translation.js' implicitly has an 'any' type.\r\n\r\n34 import { createSearchTranslate } from '../support/translation'\r\n ~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:48:17 - error TS2339: Property 'hot' does not exist on type 'ImportMeta'.\r\n\r\n48 if (import.meta.hot) {\r\n ~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:49:15 - error TS2339: Property 'hot' does not exist on type 'ImportMeta'.\r\n\r\n49 import.meta.hot.accept('/@localSearchIndex', (m) => {\r\n ~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPLocalSearchBox.vue:49:49 - error TS7006: Parameter 'm' implicitly has an 'any' type.\r\n\r\n49 import.meta.hot.accept('/@localSearchIndex', (m) => {\r\n ~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:10:35 - error TS7016: Could not find a declaration file for module '../../shared'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/shared.js' implicitly has an 'any' type.\r\n\r\n10 import type { DefaultTheme } from '../../shared'\r\n ~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:11:25 - error TS7016: Could not find a declaration file for module '../composables/data'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/composables/data.js' implicitly has an 'any' type.\r\n\r\n11 import { useData } from '../composables/data'\r\n ~~~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:14:26 - error TS2304: Cannot find name '__VP_LOCAL_SEARCH__'.\r\n\r\n14 const VPLocalSearchBox = __VP_LOCAL_SEARCH__\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:18:28 - error TS2304: Cannot find name '__ALGOLIA__'. \r\n\r\n18 const VPAlgoliaSearchBox = __ALGOLIA__\r\n ~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:48:8 - error TS2304: Cannot find name '__ALGOLIA__'. \r\n\r\n48 if (!__ALGOLIA__) {\r\n ~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:113:5 - error TS2304: Cannot find name '__VP_LOCAL_SEARCH__'.\r\n\r\n113 if (__VP_LOCAL_SEARCH__) {\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:129:18 - error TS2304: Cannot find name '__ALGOLIA__'. \r\n\r\n129 const provider = __ALGOLIA__ ? 'algolia' : __VP_LOCAL_SEARCH__ ? 'local' : ''\r\n ~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue:129:44 - error TS2304: Cannot find name '__VP_LOCAL_SEARCH__'.\r\n\r\n129 const provider = __ALGOLIA__ ? 'algolia' : __VP_LOCAL_SEARCH__ ? 'local' : ''\r\n ~~~~~~~~~~~~~~~~~~~\r\n\r\nnode_modules/vitepress/dist/client/theme-default/components/VPNavBarSearchButton.vue:3:39 - error TS7016: Could not find a declaration file for module '../support/translation'. 'C:/Projects/bootstrap-vue-next/apps/docs/node_modules/vitepress/dist/client/theme-default/support/translation.js' implicitly has an 'any' type.\r\n\r\n3 import { createSearchTranslate } from '../support/translation'\r\n\r\n```\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],4476,"Enable use of search components in custom layouts","2025-01-17T04:43:47Z","https://github.com/vuejs/vitepress/issues/4476",0.6492922,{"description":2904,"labels":2905,"number":2909,"owner":2871,"repository":2872,"state":2882,"title":2910,"updated_at":2911,"url":2912,"score":2913},"### Describe the bug\r\n\r\nI wrote a custom VitePress theme with UnoCSS, and I tried to import the theme from another project.\r\n\r\nBut after imported, the dev server failed to render the page and reported \r\n\r\n```\r\n[plugin:vite:import-analysis] Failed to resolve import \"virtual:uno.css\" from \"../theme/.vitepress/theme/index.js\". Does the file exist?\r\n/home/projects/stackblitz-starters-9izmbf/theme/.vitepress/theme/index.js:3:9\r\n1 | // https://vitepress.dev/guide/custom-theme\r\n2 | import Layout from './Layout.vue';\r\n3 | import 'virtual:uno.css';\r\n | ^\r\n4 | \r\n5 | export default {\r\n```\r\n\r\nI'm not sure which part of it is wrong. I don't even know if this is a VitePress bug. Please check the Stackblitz repro below.\r\n\r\n### Reproduction\r\n\r\nThis StackBlitz project reproduces the bug. BTW, the start script might execute very slowly.\r\n\r\nhttps://stackblitz.com/edit/stackblitz-starters-9izmbf?file=readme.md\r\n\r\n### Expected behavior\r\n\r\nThe test project in the above StackBlitz repro with external theme to work normally without additional configuration.\r\n\r\n### System Info\r\n\r\n```sh\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: 16.20.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 pnpm: 8.6.10 - /usr/local/bin/pnpm\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.",[2906],{"name":2907,"color":2908},"bug: pending triage","e99695",2845,"Cannot use external theme with UnoCSS","2023-09-01T00:04:32Z","https://github.com/vuejs/vitepress/issues/2845",0.65286267,{"description":2915,"labels":2916,"number":2918,"owner":2871,"repository":2872,"state":2882,"title":2919,"updated_at":2920,"url":2921,"score":2922},"### Describe the bug\r\n\r\nWhen extending the default theme with pre-built Vue component, dev server, build stages behave differently when install the pre-built Vue component as workspace dependency and as a regular npm registry dependency.\r\n\r\nThe integrate the pre-built Vue component consists native elements with reference to one of the field `lang` returned by a composable `useData()` from `vitepress`:\r\n\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { useData } from 'vitepress'\r\n\r\nconst { lang } = useData()\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ch1>TryUseData\u003C/h1>\r\n \u003Cp>lang: {{ lang }}\u003C/p>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\nThe bundled esm module looks like this:\r\n\r\n```js\r\nimport { defineComponent as n, openBlock as a, createElementBlock as o, createElementVNode as e, toDisplayString as r, unref as l } from \"vue\";\r\nimport { useData as s } from \"vitepress\";\r\nconst c = /* @__PURE__ */ e(\"h1\", null, \"TryUseData\", -1), f = /* @__PURE__ */ n({\r\n __name: \"TryUseData\",\r\n setup(p) {\r\n const { lang: t } = s();\r\n return (_, m) => (a(), o(\"div\", null, [\r\n c,\r\n e(\"p\", null, \"lang: \" + r(l(t)), 1)\r\n ]));\r\n }\r\n});\r\nexport {\r\n f as TryUseData\r\n};\r\n```\r\n\r\nThis pre-built component works well and expected when install the bundled package in Monorepo, but if you try to build when install it as a regular dependency, error appears:\r\n\r\n```shell\r\nnr docs:build\r\n\r\n> @ docs:build /vitepress-usedata-repro-monorepo/repros/regular-dep\r\n> vitepress build\r\n\r\n\r\n vitepress v1.0.0-rc.12\r\n\r\n✓ building client + server bundles...\r\nbuild error:\r\nfile://vitepress-usedata-repro-monorepo/repros/regular-dep/node_modules/.pnpm/vitepress-usedata-repro-monorepo-components@1.0.0_vitepress@1.0.0-rc.12_vue@3.3.4/node_modules/vitepress-usedata-repro-monorepo-components/dist/index.es.mjs:2\r\nimport { useData as s } from \"vitepress\";\r\n ^^^^^^^\r\nSyntaxError: The requested module 'vitepress' does not provide an export named 'useData'\r\n at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)\r\n at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)\r\n ELIFECYCLE Command failed with exit code 1.\r\n```\r\n\r\n### What I tried\r\n\r\n#### With a locally `\u003CClientOnly>`\r\n\r\nSince the `ClientOnly` is not exported and it cannot be correctly processed in external UI libraries, I tried to use a local wrapped `\u003CClientOnly>` component with a ref boolean value `mounted` to conditional render the children components with the `v-if` render, it worked when used as regular dependency.\r\n\r\n#### With a `\u003CSuspense>` and lazy import\r\n\r\nI referenced [Importing in Mounted Hook](https://vitepress.dev/guide/ssr-compat#importing-in-mounted-hook) section of VitePress documentation, it suggests:\r\n\r\n> ```ts\r\n> onMounted(() => {\r\n> import('./lib-that-access-window-on-import').then((module) => {\r\n> // use code\r\n> })\r\n> })\r\n> ```\r\n\r\nHowever, VitePress uses `provide` and `inject` API from Vue for `useData()` and `inject()` is not possible to be called outside of `setup()` function, so I have to wrapped the `lang` into a child component with a `v-model:lang` as `v-model`, and `await import('vitepress')` to get it working.\r\n\r\n### Thoughts\r\n\r\nThough, I find my way to solve it, but **why i18n is not possible to obtain when building when VitePress is a static site?** I think there should be some bugs or behaviors behind the scene that I don't know about which causes these errors while behaves differently.\r\n\r\n### Reproduction\r\n\r\nFull reproduction requires a private npm registry to simulate the npm bahavior, therefore I created a detailed reproduction as a repository rather than a StackBlitz container: https://github.com/nekomeowww/reproduction-vitepress-usedata-error\r\n\r\n> I cannot find a better automated way to achieve this, if you have any better and easier reproduction method, please share it with me!\r\n\r\n### Expected behavior\r\n\r\n1. The 'useData' is accessible from 'vitepress' when in runtime and build time, it shouldn't produces errors.\r\n2. Workaround to obtain the i18n locale code. Shouldn't be impossible to obtain it when generating static sites.\r\n3. Workaround for pre-built Vue components.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 82.81 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.17.1 - ~/.volta/tools/image/node/18.17.1/bin/node\r\n Yarn: 3.6.1 - ~/.volta/tools/image/yarn/3.6.1/bin/yarn\r\n npm: 9.6.7 - ~/.volta/tools/image/node/18.17.1/bin/npm\r\n pnpm: 8.6.12 - ~/.volta/bin/pnpm\r\n Browsers:\r\n Chrome: 117.0.5938.88\r\n Chrome Canary: 119.0.6016.0\r\n Safari: 16.5.2\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nI found out a statement says the vitepress is specially handled in issue #1900:\r\n\r\n> As mentioned above, The 'vitepress' dose not provide an export named 'useData'. The actual dependence is 'vitepress/dist/client/index.js'\r\n> Because the 'vitepress' is specially processed in the development environment. You will not be confused in vitepress project when debugging API Reference. But vitepress is actually a CLI role.\r\n\r\nI tried to integrate and import `vitepress/dist/client/index.js` instead of import it directly in the Vue component, however, another build error would appear when building the Vue component (yes, before install and import into a VitePress `theme/index.ts`):\r\n\r\n```shell\r\nnr build \r\n\r\n> vitepress-usedata-repro-monorepo-components@1.0.7 build /packages/vitepress-usedata-repro-monorepo-components\r\n> vite build && vue-tsc --declaration --emitDeclarationOnly\r\n\r\nvite v4.4.9 building for production...\r\n✓ 7 modules transformed.\r\n✓ built in 225ms\r\n[vite]: Rollup failed to resolve import \"@siteData\" from \"/plugins/node_modules/.pnpm/vitepress@1.0.0-rc.12_@algolia+client-search@4.19.1_@types+node@20.6.0_less@4.2.0_search-insights@2.8.2/node_modules/vitepress/dist/client/app/data.js\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\nerror during build:\r\nError: [vite]: Rollup failed to resolve import \"@siteData\" from \"/plugins/node_modules/.pnpm/vitepress@1.0.0-rc.12_@algolia+client-search@4.19.1_@types+node@20.6.0_less@4.2.0_search-insights@2.8.2/node_modules/vitepress/dist/client/app/data.js\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\n at viteWarn (file:///plugins/node_modules/.pnpm/vite@4.4.9_@types+node@20.6.0_less@4.2.0/node_modules/vite/dist/node/chunks/dep-df561101.js:48142:27)\r\n at onRollupWarning (file:///plugins/node_modules/.pnpm/vite@4.4.9_@types+node@20.6.0_less@4.2.0/node_modules/vite/dist/node/chunks/dep-df561101.js:48174:9)\r\n at onwarn (file:///plugins/node_modules/.pnpm/vite@4.4.9_@types+node@20.6.0_less@4.2.0/node_modules/vite/dist/node/chunks/dep-df561101.js:47902:13)\r\n at file:///plugins/node_modules/.pnpm/rollup@3.28.1/node_modules/rollup/dist/es/shared/node-entry.js:24194:13\r\n at Object.logger [as onLog] (file:///plugins/node_modules/.pnpm/rollup@3.28.1/node_modules/rollup/dist/es/shared/node-entry.js:25867:9)\r\n at ModuleLoader.handleInvalidResolvedId (file:///plugins/node_modules/.pnpm/rollup@3.28.1/node_modules/rollup/dist/es/shared/node-entry.js:24780:26)\r\n at file:///plugins/node_modules/.pnpm/rollup@3.28.1/node_modules/rollup/dist/es/shared/node-entry.js:24740:26\r\n ELIFECYCLE Command failed with exit code 1.\r\n```\r\n\r\nBut when I set the suggested `build.rollupOptions.external` with `vitepress/dist/client/index.js`, build passed with no error. But another failed to resolve error would appear when building for VitePress as a regular dependency:\r\n\r\n```shell\r\nbuild error:\r\nError [ERR_MODULE_NOT_FOUND]: Cannot find module '/vitepress-usedata-repro-monorepo/repros/regular-dep/node_modules/.pnpm/vitepress@1.0.0-rc.12_@algolia+client-search@4.20.0_search-insights@2.8.2/node_modules/vitepress/dist/client/app/data' imported from /vitepress-usedata-repro-monorepo/repros/regular-dep/node_modules/.pnpm/vitepress@1.0.0-rc.12_@algolia+client-search@4.20.0_search-insights@2.8.2/node_modules/vitepress/dist/client/index.js\r\n at new NodeError (node:internal/errors:405:5)\r\n at finalizeResolution (node:internal/modules/esm/resolve:324:11)\r\n at moduleResolve (node:internal/modules/esm/resolve:943:10)\r\n at defaultResolve (node:internal/modules/esm/resolve:1129:11)\r\n at nextResolve (node:internal/modules/esm/loader:163:28)\r\n at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)\r\n at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)\r\n at ModuleWrap.\u003Canonymous> (node:internal/modules/esm/module_job:77:40)\r\n at link (node:internal/modules/esm/module_job:76:36)\r\n ELIFECYCLE Command failed with exit code 1.\r\n```\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.",[2917],{"name":2907,"color":2908},2987,"inconsistent error behavior about The requested module `'vitepress'` does not provide an export named `'useData'`","2023-09-27T00:04:18Z","https://github.com/vuejs/vitepress/issues/2987",0.66090715,{"description":2924,"labels":2925,"number":2929,"owner":2871,"repository":2872,"state":2882,"title":2930,"updated_at":2931,"url":2932,"score":2933},"### Discussed in https://github.com/vuejs/vitepress/discussions/527\r\n\r\n\u003Cdiv type='discussions-op-text'>\r\n\r\n\u003Csup>Originally posted by **WebMechanic** February 11, 2022\u003C/sup>\r\nHello,\r\n\r\nI have a fresh install of VitePress to document our new Style Guide and wanted to use the [Import Code Snippets](https://vitepress.vuejs.org/guide/markdown.html#import-code-snippets) feature for .js, .css and .html fragments, but the file(s) are not included. I tried all sorts of pathnames with/without the `base`, relative, absolute, all to no avail.\r\nEverything else works like a charme.\r\n\r\nThe project is a simple Vite Vue project. I then installed VitePress with yarn. \r\nIt resides in `src/_docs/.vitepress`.\r\n\r\nHere's the config file\r\n```js\r\nimport {defineConfig} from 'vitepress'\r\nexport default defineConfig({\r\n base: '/src/_docs/',\r\n title: \"The Style Guide\",\r\n markdown: {\r\n lineNumbers: false,\r\n toc: {includeLevel: [1, 2]},\r\n }\r\n}\r\n```\r\n\u003C/div>\r\n\r\nIt's not clear to me, if this requires some special care for Prism. Configuration seems very different fro what I can find on Lea Verou's site.\r\n",[2926],{"name":2927,"color":2928},"invalid","ffffff",530,"\"Import Code Snippets\" not working","2023-01-21T16:04:03Z","https://github.com/vuejs/vitepress/issues/530",0.6623819,{"description":2935,"labels":2936,"number":2938,"owner":2871,"repository":2872,"state":2882,"title":2939,"updated_at":2940,"url":2941,"score":2942},"\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\nAfter running npx vitepress, I open the browser and load the address of http://localhost:3000, but I get a error.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\nPS D:\\桌面\\demo> npx vitepress\r\nvitepress v0.5.0\r\nvite v1.0.0-rc.4\r\nlistening at http://localhost:3000\r\n[vite] Failed to resolve module import \"vue/dist/vue.runtime.esm-bundler.js.0.0-rc.5@vuedist\u000bue.runtime.esm-bundler.js\". (imported by /@app/components/Debug.vue)\r\n\r\n**Expected behavior**\r\nGetting \"Hello Vitepress\" in browser.\r\n\r\n**System Info**\r\n- vitepress version: v0.5.0\r\n- vite version: v1.0.0-rc.4\r\n- Node version: 12.14.0\r\n- OS version:10.0.19041 暂缺 Build 19041\r\n\r\n**Additional context**\r\n尤大大,I am you big fan.\r\n",[2937],{"name":2907,"color":2908},65,"服务启动之后,进入地址报错","2023-01-21T16:25:36Z","https://github.com/vuejs/vitepress/issues/65",0.66480625,{"description":2944,"labels":2945,"number":2947,"owner":2871,"repository":2872,"state":2882,"title":2948,"updated_at":2949,"url":2950,"score":2951},"\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",[2946],{"name":2907,"color":2908},60,"Is vitepress auto register components in `.vitepress/components`?","2023-01-21T16:25:31Z","https://github.com/vuejs/vitepress/issues/60",0.665902,{"description":2953,"labels":2954,"number":2956,"owner":2871,"repository":2872,"state":2882,"title":2957,"updated_at":2958,"url":2959,"score":2960},"\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\nThe theme is set as follows\r\n\r\n``` js\r\n{\r\n ...,\r\n title: 'Vite vui',\r\n base: '/vite-vui-docs/',\r\n themeConfig: {\r\n repo: 'bhabgs/vite-vui',\r\n search: true, // here\r\n sidebar: {\r\n '/': [\r\n {\r\n text: 'vui',\r\n children: [\r\n { text: '介绍', link: '/' },\r\n { text: '日志', link: '/components/log' },\r\n { text: 'Button', link: '/components/button/' },\r\n { text: 'Layout', link: '/components/layout/' },\r\n { text: 'contextmenu', link: '/components/contextmenu/' },\r\n ],\r\n },\r\n {\r\n text: 'vuu',\r\n children: [\r\n { text: '介绍', link: '/vuu/' },\r\n { text: '日志', link: '/vuu/log' },\r\n { text: '某个功能', link: '/vuu/any' },\r\n ],\r\n },\r\n ],\r\n },\r\n author: 'bhabgs',\r\n nav: [\r\n { text: '首页', link: '/' },\r\n { text: '分类', link: '/tags' },\r\n ],\r\n },\r\n dest: 'public',\r\n}\r\n```\r\n\r\n**To Reproduce**\r\n[to view](https://github.com/bhabgs/vite-vui/tree/master/docs)\r\n\r\n\r\n**Expected behavior**\r\nshow search box.\r\n\r\n\r\n\r\n**System Info**\r\n- vitepress version: 0。12.2\r\n- vite version: 2.0.3\r\n- Node version: 14*\r\n- OS version: 11.2.2\r\n\r\n\r\n",[2955],{"name":2927,"color":2928},272,"Invalid search for topic Settings !!!","2023-01-21T16:04:09Z","https://github.com/vuejs/vitepress/issues/272",0.6669512,["Reactive",2962],{},["Set"],["ShallowReactive",2965],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$flBSh7LmfffXuBTcyYW7aVzOFuT8XTefUANSDtVgC48s":-1},"/vuejs/vitepress/182"]