\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\n// import { useRoute } from \"vitepress\";\r\n// const route = useRoute();\r\n\u003C/script>\r\n```\r\n\r\n3. Create `docs/.vitepress/theme/index.js` with the following contents:\r\n\r\n```js\r\nimport Layout from \"./Layout.vue\";\r\n\r\nexport default {\r\n Layout,\r\n};\r\n```\r\n\r\n4. Run `yarn docs:dev` and open http://localhost:3000. Note the heading doesn't have any styles applied to it:\r\n\r\n\r\n\r\n5. Uncomment the lines in the `\u003Cscript setup>` section in `docs/.vitepress/theme/Layout.vue`. Note the heading now has the default styles applied to it, even though we only imported `useRoute`:\r\n\r\n\r\n\r\n**Expected behavior**\r\nThe heading should remain unstyled since we aren't explicitly importing any styles.\r\n\r\n**System Info**\r\n- vitepress version: v0.9.2\r\n- vite version: v1.0.0-rc.13\r\n- Node version: v12.20.0\r\n- OS version: macOS Catalina 10.15.7\r\n\r\n**Additional context**\r\nI had a quick look at the Vitepress code and it looks like the problem might be to do with this line: https://github.com/vuejs/vitepress/blob/309aa7a8d0e7ab08c1c9db258c74709a66b295cb/src/client/app/exports.ts#L29\r\n\r\nAdding the following to `docs/.vitepress/config.js`:\r\n\r\n```javascript\r\nmodule.exports = {\r\n alias: {\r\n \"/@default-theme/index\": \"/@theme/empty.js\",\r\n },\r\n};\r\n```\r\n\r\n...and creating an empty file `docs/.vitepress/theme/empty.js` prevents the default styles being applied.\r\n",[],182,"Importing default composables also imports default theme's styles","2023-01-21T16:23:59Z","https://github.com/vuejs/vitepress/issues/182",0.6844061,{"description":2882,"labels":2883,"number":2887,"owner":2866,"repository":2867,"state":2868,"title":2888,"updated_at":2889,"url":2890,"score":2891},"### Describe the bug\n\nHi I am new to vitepress please help I want to install Medium -zoom (yarn add -D @Vue#8625press/plugin-medium-zoom) plugin I install the package \r\nis there something I am missing\r\n```\r\n//package.json\r\n\"devDependencies\": {\r\n \"@vuepress/plugin-medium-zoom\": \"^1.9.7\",\r\n \"@vuepress/shared-utils\": \"^1.9.7\",\r\n \"postcss\": \"^8.4.6\",\r\n \"sass\": \"^1.49.8\",\r\n \"stylus\": \"^0.56.0\",\r\n \"tailwindcss\": \"^3.0.23\",\r\n \"vitepress\": \"^0.22.2\"\r\n },\r\n \"dependencies\": {\r\n \"autoprefixer\": \"^10.4.2\",\r\n \"markdown-it-imsize\": \"^2.0.1\"\r\n },\r\n \"postcss\": {\r\n \"plugins\": {\r\n \"tailwindcss\": {},\r\n \"autoprefixer\": {}\r\n }\r\n } \r\n```\r\n// docs/vite.config.ts```\r\nimport { defineConfig } from \"vite\";\r\nimport medium from \"@vuepress/plugin-medium-zoom\";\r\n\r\nexport default defineConfig({\r\n plugins: [medium],\r\n});\r\n```\r\nfirstly I was getting following error so I installed yarn add -D @Vue#8625press/shared-utils\r\n```\r\nfailed to load config from /home/prashant/www/vitepress/docs/vite.config.js\r\nfailed to start server. error:\r\n Error: Cannot find module '@vuepress/shared-utils'\r\n```\r\nthen I installed yarn add markdown-it-imsize\r\n```\r\nfailed to load config from /home/prashant/www/vitepress/docs/vite.config.js\r\nfailed to start server. error:\r\n Error: Cannot find module 'markdown-it-emoji/lib/data/full.json'\r\n``` now its showing new missing dependancy ```failed to load config from /home/prashant/www/vitepress/docs/vite.config.js\r\nfailed to start server. error:\r\n Error: Cannot find module 'lru-cache'\r\n```\n\n### Reproduction\n\nyarn dev\n\n### Expected behavior\n\nshould start server with the zoom feature\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)\r\n CPU: (4) x64 Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz\r\n Memory: 1.38 GB / 5.71 GB\r\n Container: Yes\r\n Shell: 5.8 - /usr/bin/zsh\r\n Binaries:\r\n Node: 14.19.0 - /usr/bin/node\r\n Yarn: 1.22.17 - /usr/local/bin/yarn\r\n npm: 7.17.0 - /usr/local/bin/npm\r\n Browsers:\r\n Brave Browser: 98.1.35.103\r\n Firefox: 97.0.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.",[2884],{"name":2885,"color":2886},"question","5D5FAE",558,"How to install vuepress plugin into vitepress","2023-01-21T16:04:18Z","https://github.com/vuejs/vitepress/issues/558",0.6957944,{"description":2893,"labels":2894,"number":2898,"owner":2866,"repository":2867,"state":2868,"title":2899,"updated_at":2900,"url":2901,"score":2902},"How to use the browser api like vuepress?",[2895],{"name":2896,"color":2897},"need more info","bdbefc",222,"Use the browser API","2023-01-21T16:22:29Z","https://github.com/vuejs/vitepress/issues/222",0.70012623,{"description":2904,"labels":2905,"number":1575,"owner":2866,"repository":2867,"state":2868,"title":2906,"updated_at":2907,"url":2908,"score":2909},"As a member of current vuepress team, I just created a prototype for vuepress next major version: https://github.com/vuepress/vuepress-next\r\n\r\n- Vue 3 ecosystem\r\n- Typescript\r\n- Drop class API, use compositional functions\r\n- Try do decouple with webpack, may support different bundlers (e.g. vite)\r\n\r\nToday I noticed vitepress and don't know where to go next 😢 \r\n\r\n@yyx990803 Could you please give some advice? ",[],"Just created vuepress-next prototype before noticed this project","2023-01-21T16:24:21Z","https://github.com/vuejs/vitepress/issues/13",0.7002125,{"description":2911,"labels":2912,"number":2913,"owner":2866,"repository":2867,"state":2868,"title":2914,"updated_at":2915,"url":2916,"score":2917},"**Is your feature request related to a problem? Please describe.**\r\n\r\nCurrently a VuePress user and excited to move to VitePress (primarily because I've written my own VP themes from scratch, and this seems to be the main design goal for v3) but:\r\n\r\n- there are various key differences between the frameworks (bundler, plugins, config)\r\n- there are significant intentional omissions in v3 (rather large list in the docs)\r\n- it's still in development\r\n\r\nAs a new / migrating user, it's a bit of a minefield and difficult to know where to start when something is omitted.\r\n\r\n**Describe the solution you'd like**\r\n\r\nRather than clogging up the issues with questions, it would be cool to get an Awesome VitePress list going, so users could find alternative plugins, or dig through the code of known solutions (i.e. the Vue Blog) and see how it's been solved before.\r\n\r\n**Describe alternatives you've considered**\r\n\r\nClog up the issues with questions, bug @kiaking on Twitter, Google solutions, etc.\r\n\r\n**Additional context**\r\n\r\nHappy to help search and review resources to get it started.\r\n\r\n",[],253,"List of examples or some kind of Awesome VitePress repo","2023-01-28T15:54:22Z","https://github.com/vuejs/vitepress/issues/253",0.7083305,{"description":2919,"labels":2920,"number":2921,"owner":2866,"repository":2867,"state":2868,"title":2922,"updated_at":2923,"url":2924,"score":2925},"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,"want more flexibility in the customization part","2023-01-21T16:20:20Z","https://github.com/vuejs/vitepress/issues/58",0.70880747,{"description":2927,"labels":2928,"number":2930,"owner":2866,"repository":2867,"state":2868,"title":2931,"updated_at":2932,"url":2933,"score":2934},"### Is your feature request related to a problem? Please describe.\n\naccent color copied from vuepress doesn't work.\r\nfile under: .vuepress/styles/palette.styl\r\nand value: $accentColor = #215AE5\n\n### Describe the solution you'd like\n\nif it works, it is easier to migrate from vuepress\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.vuejs.org).\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.",[2929],{"name":2885,"color":2886},1208,"Accent color","2023-01-21T14:27:00Z","https://github.com/vuejs/vitepress/issues/1208",0.7117999,{"description":2936,"labels":2937,"number":2941,"owner":2866,"repository":2867,"state":2868,"title":2942,"updated_at":2943,"url":2944,"score":2945},"### 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.",[2938],{"name":2939,"color":2940},"bug: pending triage","e99695",1681,"[QUESTION] checking if in client side to install plugin","2023-01-21T14:20:27Z","https://github.com/vuejs/vitepress/issues/1681",0.71264523,{"description":2947,"labels":2948,"number":2949,"owner":2866,"repository":2867,"state":2868,"title":2950,"updated_at":2951,"url":2952,"score":2953},"### Is your feature request related to a problem? Please describe.\r\n\r\n许多第三方库会在导入时的顶层代码中访问 `window` 或者 `document`\r\n我不可能在第三库的源码中加上条件判断,这是不切实际的。\r\n\r\n假设有一个Vue插件模块名字就叫 \"a-vue-plugin\",并且假设它提供了大量有用的Vue组件或者实用功能。\r\n```typescript\r\nwindow.ABC = 123 // 这个模块在代码顶层就访问里 window\r\n\r\nconst plugin = {\r\n // ...\r\n}\r\n\r\nexport default plugin\r\n```\r\n\r\ndocs/.vitepress/theme/index.ts\r\n```typescript\r\n// ...\r\nimport { plugin } from 'a-vue-plugin''\r\n\r\nexport default define\u003CTheme>({\r\n NotFound,\r\n Layout: VPApp,\r\n enhanceApp: ({ app }) => {\r\n // 这样写显然是无济于事的,因为在执行 import { plugin } from 'a-vue-plugin' 时就已经访问到 window 了 \r\n if (!import.meta.env.SSR) {\r\n app.use(plugin) // 这里需要使用这个插件\r\n }\r\n },\r\n})\r\n```\r\n最终抛出错误\r\n```\r\n⠋ rendering pages...ReferenceError: window is not defined\r\n```\r\n\r\n### Describe the solution you'd like\r\n\r\n目前缺少完全合理的解决方案,请求官方针对此问题提供标准的解决方案或者规避方案。\r\n\r\n### Describe alternatives you've considered\r\n\r\n这是一个可能的解决方案,但需要 enhanceApp 支持异步才行。\r\n```typescript\r\nexport default define\u003CTheme>({\r\n NotFound,\r\n Layout: VPApp,\r\n enhanceApp: async ({ app }) => {\r\n if (!import.meta.env.SSR) {\r\n const plugin = (await import('a-vue-plugin')).default\r\n app.use(plugin)\r\n }\r\n },\r\n})\r\n```\r\n\r\n### Additional context\r\n\r\n类似的问题 [#](https://github.com/vuejs/vitepress/issues/1727#issue-1507239476)\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] 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.",[],1884,"如何针对静态导入跳过SSR?","2023-03-23T00:04:27Z","https://github.com/vuejs/vitepress/issues/1884",0.7135959,["Reactive",2955],{},["Set"],["ShallowReactive",2958],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fTuMqvlGK-NWA3JznZA5AsuI0ZLvGqV_u-b6K0Cw5Bk8":-1},"/vuejs/vitepress/62"]