\r\n title: Feature A\r\n details: Lorem ipsum dolor sit amet, consectetur adipiscing elit\r\n```\r\n\r\nCheck the feature icon type\r\n```ts\r\ntype FeatureIcon =\r\n | string\r\n | { src: string; alt?: string; width?: string; height: string }\r\n | {\r\n light: string\r\n dark: string\r\n alt?: string\r\n width?: string\r\n height: string\r\n }\r\n```\r\n\r\nI refer to the render logic, use `v-html` render the icon.\r\nDisplay well in `dev` environment, but shows errors in `prod` environment.\r\n\r\n| dev | build |\r\n| ----------- | ----------- |\r\n|  |  |\r\n\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/github/zyyv/vitepress-unocss-issue\r\n\r\n- Display right run `pnpm dev`\r\n- Display error run `pnpm build && pnpm preview`\r\n\r\n### Expected behavior\r\n\r\nDev and build behave the same\r\n\r\n### System Info\r\n\r\n```Text\r\nlatest\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.",[2881,2884,2887],{"name":2882,"color":2883},"build","377ba8",{"name":2885,"color":2886},"has-workaround","1B4515",{"name":2868,"color":2869},4045,"SSR in dev for more consistent output in dev and prod","2025-03-02T18:08:58Z","https://github.com/vuejs/vitepress/issues/4045",0.6989807,{"description":2894,"labels":2895,"number":2899,"owner":2871,"repository":2872,"state":2900,"title":2901,"updated_at":2902,"url":2903,"score":2904},"### Describe the bug\n\nHey, \r\n\r\nIt's not a bug report, just a question.\r\n\r\nHow to install with a module who's use browser features (document.querySelectorAll) with `ctx.app.use()` on client side ? \r\n\r\nI can't find the way in the documentation. In VuePress, we can use the variable `__VUEPRESS_SSR__`, do you something similar in VitePress ? \r\n\r\nN.B: It's works fine with the dev serve but fail on build time\r\n\r\n## In VuePress\r\n\r\n`docs/.vuepress/client.ts`\r\n\r\n```ts\r\nimport { defineClientConfig } from '@vuepress/client'\r\nimport { clientModule } from 'lib'\r\n\r\nexport default defineClientConfig({\r\n enhance: async ({ app, router }) => {\r\n if (!__VUEPRESS_SSR__) {\r\n app.use(clientModule)\r\n }\r\n }\r\n})\r\n```\r\n\r\n## In VitePress \r\n\r\n`docs/.vitepress/theme/index.ts`\r\n\r\n```ts\r\nconst theme: typeof DefaultTheme = {\r\n ...DefaultTheme,\r\n enhanceApp({ app }) {\r\n app.use(clientModule) // It's doesn't works 😑\r\n },\r\n}\r\n```\r\n\r\n\n\n### Reproduction\n\n-\n\n### Expected behavior\n\nBe able to build the app with client\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 12.6.1\r\n CPU: (10) arm64 Apple M1 Pro\r\n Memory: 314.09 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.18.1 - /opt/homebrew/opt/node@16/bin/node\r\n Yarn: 1.22.19 - ~/.yarn/bin/yarn\r\n npm: 8.19.2 - /opt/homebrew/opt/node@16/bin/npm\r\n Browsers:\r\n Chrome: 108.0.5359.98\r\n Firefox: 101.0.1\r\n Safari: 15.6.1\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.30 => 1.0.0-alpha.30\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.",[2896],{"name":2897,"color":2898},"bug: pending triage","e99695",1681,"closed","[QUESTION] checking if in client side to install plugin","2023-01-21T14:20:27Z","https://github.com/vuejs/vitepress/issues/1681",0.6489296,{"description":2906,"labels":2907,"number":2909,"owner":2871,"repository":2872,"state":2900,"title":2910,"updated_at":2911,"url":2912,"score":2913},"### Describe the bug\n\n项目中使用了 highlightjs 作为代码预览高亮工具。开发时并未发现异常,但是在构建时提示错误\r\n```text\r\nbuild error:\r\n file:///C:/demo-code/vitepress-error/docs/.vitepress/.temp/app.js:7\r\nimport hljsVuePlugin from \"@highlightjs/vue-plugin\";\r\n ^^^^^^^^^^^^^\r\nSyntaxError: The requested module '@highlightjs/vue-plugin' does not provide an export named 'default'\r\n at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)\r\n at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)\r\n at async Promise.all (index 0)\r\n at async ESMLoader.import (node:internal/modules/esm/loader:385:24)\r\n at async build (file:///C:/demo-code/vitepress-error/node_modules/.pnpm/vitepress@1.0.0-alpha.45/node_modules/vitepress/dist/node/serve-ebe7f464.js:42286:24)\r\n ELIFECYCLE Command failed with exit code 1.\r\n```\r\n一开始我怀疑是该库存在问题,但是在常规 vue 应用中使用并构建都是没问题的。\n\n### Reproduction\n\n最小复现\r\n```text\r\nhttps://github.com/SaberA1ter/vitepress-error-demo\r\n```\r\n组件在 ```docs/.vitepress/theme/index.js``` 中注册,报错也是发生于此\n\n### Expected behavior\n\n开发正常,但是构建报错。\n\n### System Info\n\n```shell\nwin11\r\n\r\nnodejs: v16.15.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/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.",[2908],{"name":2897,"color":2898},1905,"build 报错: SyntaxError: The requested module '@highlightjs/vue-plugin' does not provide an export named 'default'","2023-02-17T00:04:39Z","https://github.com/vuejs/vitepress/issues/1905",0.6573071,{"description":2915,"labels":2916,"number":2918,"owner":2871,"repository":2872,"state":2900,"title":2919,"updated_at":2920,"url":2921,"score":2922},"### Describe the bug\n\n### 我在打包的时候出现了Build error, window is not defined\r\n\r\n`theme/index.js`\r\n`\r\nimport MyLayout from '../../../components/MyLayout.vue'\r\n`\r\n`\r\nexport default {\r\n ...DefaultTheme,\r\n Layout: MyLayout\r\n}\r\n`\r\n其中的MyLayout是一个扩展组件 请问这样怎么使用ClientOnly包装呢?\r\n\r\n\n\n### Reproduction\n\n无\n\n### Expected behavior\n\n希望能正常Build 不报build error window is not defined这个错误\n\n### System Info\n\n```shell\n\"vitepress\": \"^1.0.0-alpha.29\",\n```\n\n\n### Additional context\n\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2917],{"name":2897,"color":2898},1808,"Layout组件怎么使用ClientOnly包装","2023-01-26T00:04:06Z","https://github.com/vuejs/vitepress/issues/1808",0.6619257,{"description":2924,"labels":2925,"number":2927,"owner":2871,"repository":2872,"state":2900,"title":2928,"updated_at":2929,"url":2930,"score":2931},"### Describe the bug\n\n什么傻逼玩意,还必须要ssr打包,你妈死了吧\n\n### Reproduction\n\n什么玩意\n\n### Expected behavior\n\n什么玩意\n\n### System Info\n\n```shell\n什么玩意\n```\n\n\n### Additional context\n\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.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2926],{"name":2897,"color":2898},1780,"window not defined","2023-01-10T07:01:37Z","https://github.com/vuejs/vitepress/issues/1780",0.66236,{"description":2933,"labels":2934,"number":2938,"owner":2871,"repository":2872,"state":2900,"title":2939,"updated_at":2940,"url":2941,"score":2942},"### Is your feature request related to a problem? Please describe.\n\nVitepress is so good,but I want use react,so...\n\n### Describe the solution you'd like\n\nlike @vite/vitepress-plugin-react\n\n### Describe alternatives you've considered\n\n_No response_\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.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.",[2935],{"name":2936,"color":2937},"wont fix","EDEED1",2295,"Support react?","2023-09-03T00:04:40Z","https://github.com/vuejs/vitepress/issues/2295",0.6628759,{"description":2944,"labels":2945,"number":2946,"owner":2871,"repository":2872,"state":2900,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Is your feature request related to a problem? Please describe.\r\n\r\nMake configuration easier.\r\n\r\n### Describe the solution you'd like\r\n\r\nSame as [vite](https://vitejs.dev/config/#config-intellisense) :\r\n\r\n```ts\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n lang: 'en-US',\r\n // ...\r\n}) \r\n``` \r\n\r\nBut we need to improve the support for theme config:\r\n\r\nBy default, `defineConfig` helper leverages the theme config type from default theme:\r\n\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\n\r\nexport default defineConfig({\r\n themeConfig: {\r\n // Type is `DefaultTheme.Config` \r\n }\r\n})\r\n```\r\n\r\nIf you use a custom theme, you'll be able to pass the generics type for your custom theme, and you need overload it with the second parameter of `defineConfig` helper:\r\n\r\n```js\r\nimport { defineConfig } from 'vitepress'\r\nimport { ThemeConfig } from 'your-theme'\r\n\r\nexport default defineConfig\u003CThemeConfig>({\r\n themeConfig: {\r\n // Type is `ThemeConfig` \r\n }\r\n}, true); // declare `usingCustomTheme` and discard usage of the default theme.\r\n```\r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\n_No response_\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] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],464,"[Feature Request] Improve TypeScript support for config file.","2023-01-21T16:20:21Z","https://github.com/vuejs/vitepress/issues/464",0.6738439,{"description":2952,"labels":2953,"number":2954,"owner":2871,"repository":2872,"state":2900,"title":2955,"updated_at":2956,"url":2957,"score":2958},"### 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.6740917,{"description":2960,"labels":2961,"number":2966,"owner":2871,"repository":2872,"state":2900,"title":2967,"updated_at":2968,"url":2969,"score":2970},"### Describe the bug\n\nwhen run `pnpm build`, it wil show this error message:\r\n```\r\nSyntaxError: The requested module '@vueuse/shared' does not provide an export named 'resolveRef'\r\n at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21)\r\n at async ModuleJob.run (node:internal/modules/esm/module_job:193:5)\r\n at async Promise.all (index 0)\r\n at async ESMLoader.import (node:internal/modules/esm/loader:337:24)\r\n at async build (file:///Users/bou/working/code/vue-pro/sinogear-frontend-pro-vue/node_modules/.pnpm/vitepress@1.0.0-alpha.30_less@4.1.3/node_modules/vitepress/dist/node/serve-e6561b64.js:42006:24)\r\n ELIFECYCLE Command failed with exit code 1.\r\n \r\n```\r\n\r\n\n\n### Reproduction\n\n- I have import a Self-developed components in `docs/.vitepress/theme/index.js`:\r\n\r\n```\r\nimport SgVue from '../../../lib/index.js';\r\n```\r\n\r\n- config in `/docs/.vitepress/config.js`:\r\n```\r\nimport { defineConfigWithTheme } from 'vitepress';\r\nimport vueJsx from '@vitejs/plugin-vue-jsx';\r\nimport baseConfig from '@vue/theme/config';\r\nimport { demoBlockPlugin } from 'vitepress-theme-demoblock';\r\nimport { SearchPlugin } from 'vitepress-plugin-search';\r\n\r\nimport { i18n, nav, sidebar } from './config/index';\r\n\r\nexport default defineConfigWithTheme({\r\n extends: baseConfig,\r\n lang: 'zh-CN',\r\n title: 'Sg Vue',\r\n description: 'Vue2.7.0+版本开发文档',\r\n srcDir: 'src',\r\n // srcExclude: ['tutorial/**/description.md'],\r\n scrollOffset: 'header',\r\n ignoreDeadLinks: true,\r\n head: [['meta', { name: 'theme-color', content: '#3c8772' }]],\r\n themeConfig: {\r\n nav,\r\n sidebar,\r\n appearance: false, // 开启 light/dark 模式\r\n // Placeholder of the i18n config for @vuejs-translations.\r\n i18n,\r\n footer: {\r\n copyright: `©2006-${new Date().getFullYear()}`\r\n }\r\n },\r\n\r\n markdown: {\r\n config(md) {\r\n // demoBlockPlugin 基于 Vitepress 的主题插件,在编写文档的时候增加 Vue 示例\r\n md.use(demoBlockPlugin, {\r\n cssPreprocessor: 'less',\r\n //markdown 中的vue代码被编译为了 vue 函数组件,需要把 import 转换为 require\r\n scriptImports: [\r\n \"import * as AntDesignVue from 'ant-design-vue'\",\r\n \"import * as SinogearVue from '../../../lib/index.js'\",\r\n \"import * as AntDesignVueIcons from '@ant-design/icons-vue'\"\r\n ],\r\n scriptReplaces: [\r\n {\r\n searchValue: /const ({ defineComponent as _defineComponent }) = Vue/g,\r\n replaceValue: 'const { defineComponent: _defineComponent } = Vue'\r\n },\r\n {\r\n searchValue: /import ({.*}) from 'ant-design-vue'/g,\r\n replaceValue: (s, s1) => `const ${s1} = AntDesignVue`\r\n },\r\n {\r\n searchValue: /import ({.*}) from '..\\/..\\/..\\/lib\\/index.js'/g,\r\n replaceValue: (s, s1) => `const ${s1} = SinogearVue`\r\n },\r\n {\r\n searchValue: /import ({.*}) from '@ant-design\\/icons-vue'/g,\r\n replaceValue: (s, s1) => `const ${s1} = AntDesignVueIcons`\r\n }\r\n ]\r\n });\r\n }\r\n },\r\n\r\n vite: {\r\n server: {\r\n host: true,\r\n port: 3001,\r\n fs: {\r\n // for when developing with locally linked theme\r\n allow: ['../..']\r\n }\r\n },\r\n build: {\r\n minify: 'terser',\r\n chunkSizeWarningLimit: Infinity\r\n },\r\n json: {\r\n stringify: true\r\n },\r\n plugins: [\r\n vueJsx(),\r\n SearchPlugin({\r\n tokenize: 'full'\r\n })\r\n ],\r\n css: {\r\n preprocessorOptions: {\r\n less: {\r\n javascriptEnabled: true\r\n }\r\n }\r\n }\r\n },\r\n\r\n vue: {\r\n reactivityTransform: true\r\n }\r\n});\r\n\r\n```\r\n\r\n- It's OK on Dev\r\n\r\n- Run `pnpm build`\r\n\n\n### Expected behavior\n\nno error show \n\n### System Info\n\n```shell\n`\"vitepress\": \"^1.0.0-alpha.28\"`\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.",[2962,2965],{"name":2963,"color":2964},"need more info","bdbefc",{"name":2868,"color":2869},1679,"The requested module '@vueuse/shared' does not provide an export named 'resolveRef'","2023-08-13T00:04:21Z","https://github.com/vuejs/vitepress/issues/1679",0.68085563,["Reactive",2972],{},["Set"],["ShallowReactive",2975],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fKYUXai_aTHncI7R1Mxu3aQ3qXZqRrTPaBmqf1COFsEo":-1},"/vuejs/vitepress/1884"]