\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,"closed","Importing default composables also imports default theme's styles","2023-01-21T16:23:59Z","https://github.com/vuejs/vitepress/issues/182",0.648953,{"description":2891,"labels":2892,"number":2896,"owner":2874,"repository":2875,"state":2885,"title":2897,"updated_at":2898,"url":2899,"score":2900},"### Describe the bug\n\nI want to use TS for my theme config, but I get the following error:\r\n```\r\nTS2307: Cannot find module 'vitepress/theme' or its corresponding type declarations.\r\n```\r\nI think it happens because there is no `theme.d.ts` in the `files` array of `package.json`.\n\n### Reproduction\n\n1. Install vitepress\r\n2. Create `docs/.vitepress/theme/index.ts` file\r\n3. Type `import DefaultTheme from 'vitepress/theme'`\r\n4. Get the error from the IDE\n\n### Expected behavior\n\nNo type error\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 11.3.1\r\n CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz\r\n Memory: 25.62 MB / 8.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 16.4.1 - ~/.nvm/versions/node/v16.4.1/bin/node\r\n npm: 7.18.1 - ~/.nvm/versions/node/v16.4.1/bin/npm\r\n Browsers:\r\n Chrome: 95.0.4638.69\r\n Firefox Developer Edition: 92.0\r\n Safari: 14.1\r\n npmPackages:\r\n vitepress: ^0.20.1 => 0.20.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/coc)\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.",[2893],{"name":2894,"color":2895},"bug: pending triage","e99695",438,"No `theme.d.ts` file in the installed library","2023-01-21T16:20:16Z","https://github.com/vuejs/vitepress/issues/438",0.6735438,{"description":2902,"labels":2903,"number":2905,"owner":2874,"repository":2875,"state":2885,"title":2906,"updated_at":2907,"url":2908,"score":2909},"### Describe the bug\r\n\r\nWhen following the documentation for extending the default theme; importing the theme and exported the extended theme results in the error `TS2708: Cannot use namespace 'DefaultTheme' as a value.`.\r\n\r\n\r\n### Reproduction\r\n\r\nIn a bare VitePress installation:\r\n\r\n`docs/.vitepress/theme/index.ts`\r\n```ts\r\nimport { DefaultTheme } from \"vitepress/theme\";\r\n\r\nexport default {\r\n extends: DefaultTheme\r\n}\r\n```\r\n\r\n`docs/.vitepress/theme/index.ts:4:11: TS2708: Cannot use namespace 'DefaultTheme' as a value.`\r\n\r\n### Expected behavior\r\n\r\nThe documented code would work.\r\n\r\n### System Info\r\n\r\n```sh\r\n System:\r\n OS: Linux 6.1 Manjaro Linux\r\n CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor\r\n Memory: 17.45 GB / 31.30 GB\r\n Container: Yes\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.20.0 - ~/.local/bin/node\r\n Yarn: 1.22.19 - ~/.local/bin/yarn\r\n npm: 9.6.5 - ~/.local/bin/npm\r\n Browsers:\r\n Chromium: 114.0.5735.133\r\n npmPackages:\r\n vitepress: ^1.0.0-beta.3 => 1.0.0-beta.3 \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.",[2904],{"name":2894,"color":2895},2532,"Cannot create theme with TypeScript: TS2708: Cannot use namespace 'DefaultTheme' as a value.","2023-06-28T00:04:53Z","https://github.com/vuejs/vitepress/issues/2532",0.67420596,{"description":2911,"labels":2912,"number":2914,"owner":2874,"repository":2875,"state":2885,"title":2915,"updated_at":2916,"url":2917,"score":2918},"### Describe the bug\n\nI'm using different fonts for the default theme, but the font files (`fonts.css`) are still packaged into the build product.\r\n\r\n\n\n### Reproduction\n\naccording official doc [https://vitepress.dev/guide/extending-default-theme#using-different-fonts](https://vitepress.dev/guide/extending-default-theme#using-different-fonts):\r\n\r\n``` js\r\n// .vitepress/theme/index.js\r\nimport DefaultTheme from 'vitepress/theme-without-fonts'\r\nimport './my-fonts.css'\r\n\r\nexport default DefaultTheme\r\n```\n\n### Expected behavior\n\nWhen using different fonts, the default font will not enter the production environment.\n\n### System Info\n\n```Text\n.\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.",[2913],{"name":2894,"color":2895},3411,"Using different fonts, but **Inter** fonts are still packaged in production","2024-01-13T00:04:50Z","https://github.com/vuejs/vitepress/issues/3411",0.6752424,{"description":2920,"labels":2921,"number":2925,"owner":2874,"repository":2875,"state":2885,"title":2926,"updated_at":2927,"url":2928,"score":2929},"### Is your feature request related to a problem? Please describe.\n\nI want to use `Badge` component in my custom theme. And the `Badge` component not exportd by `vitepress/theme`\r\n\r\nSo I can do this only:\r\n```ts\r\nimport Theme from 'vitepress/theme'\r\n\r\nexport default {\r\n\t...Theme,\r\n\tenhanceApp(ctx) {\r\n\t \tTheme.enhanceApp(ctx)\r\n\t\t// Custom content\r\n\t}\r\n}\r\n```\n\n### Describe the solution you'd like\n\nSo I' d like to import `Badge` from `vitepress/theme` directly\r\n\r\n```ts\r\nimport { Badge } from 'vitepress/theme'\r\n\r\nexport default {\r\n\t...Theme,\r\n\tenhanceApp(ctx) {\r\n\t \tctx.app.component('Badge', VPBadge);\r\n\t\t// Custom content\r\n\t}\r\n}\r\n```\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.",[2922],{"name":2923,"color":2924},"contribution welcome","11E4B8",3430,"Export `Badge` component for custom Theme","2024-01-18T00:04:42Z","https://github.com/vuejs/vitepress/issues/3430",0.67738223,{"description":2931,"labels":2932,"number":2933,"owner":2874,"repository":2875,"state":2885,"title":2934,"updated_at":2935,"url":2936,"score":2937},"### Describe the bug\n\nWhen I import PrimeVue and configure it in the theme/index.ts file, I got a error:\r\n```\r\n4:34:33 PM [vitepress] Pre-transform error: Failed to resolve entry for package \"primevue\". The package may have incorrect main/module/exports specified in its package.json: Missing \".\" specifier in \"primevue\" package\r\n4:34:33 PM [vitepress] Internal server error: Failed to resolve entry for package \"primevue\". The package may have incorrect main/module/exports specified in its package.json: Missing \".\" specifier in \"primevue\" package\r\n Plugin: vite:import-analysis\r\n ```\n\n### Reproduction\n\nCreate a vitepress project theme with custom theme:\r\n```\r\npnpm add vitepress\r\npnpm vitepress init\r\n```\r\nchoose all default but the Theme section:\r\n```\r\n◆ Theme:\r\n│ ○ Default Theme (Out of the box, good-looking docs)\r\n│ ○ Default Theme + Customization\r\n│ ● Custom Theme\r\n```\r\nthen add the PrimeVue lib:\r\n```\r\npnpm add primevue @primevue/themes\r\n```\r\nuse it in the theme/index.ts\r\n```\r\n// theme/index.ts\r\nimport Layout from './Layout.vue'\r\nimport type { Theme } from 'vitepress'\r\nimport './style.css'\r\n\r\nimport PrimeVue from \"primevue\"\r\nimport Aura from \"@primevue/themes\"\r\n\r\nexport default {\r\n\tLayout,\r\n\tenhanceApp({ app, router, siteData }) {\r\n\t\t// ...\r\n\t\tapp.use(PrimeVue, {\r\n\t\t\ttheme: {\r\n\t\t\t\tpreset: Aura\r\n\t\t\t}\r\n\t\t})\r\n\t}\r\n} satisfies Theme\r\n```\r\nthen run `pnpm docs:dev`\r\n\n\n### Expected behavior\n\nIt should be running without any error, but i got a package error.\r\nIt seems like there's some problem with `vite:import-analysis`\r\n\n\n### System Info\n\n```Text\nI tested in Arch and Windows\r\n\r\n System:\r\n OS: Linux 5.15 Arch Linux\r\n CPU: (16) x64 AMD Ryzen 7 8845H w/ Radeon 780M Graphics\r\n Memory: 5.77 GB / 7.41 GB\r\n Container: Yes\r\n Shell: 5.9 - /usr/bin/zsh\r\n Binaries:\r\n Node: 22.8.0 - ~/.local/share/pnpm/node\r\n npm: 10.8.2 - ~/.local/share/pnpm/npm\r\n pnpm: 9.10.0 - ~/.local/share/pnpm/pnpm\r\n```\r\n\r\n```\r\n System:\r\n OS: Windows 11 10.0.22631\r\n CPU: (16) x64 AMD Ryzen 7 8845H w/ Radeon 780M Graphics\r\n Memory: 4.74 GB / 15.30 GB\r\n Binaries:\r\n Node: 20.17.0 - E:\\nodejs\\node.EXE\r\n npm: 10.8.2 - E:\\nodejs\\npm.CMD\r\n pnpm: 9.10.0 - ~\\AppData\\Local\\Microsoft\\WinGet\\Links\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (127.0.2651.86)\r\n Internet Explorer: 11.0.22621.3527\r\n```\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.",[],4192,"error while integrate custom theme with PrimeVue","2024-09-21T04:43:12Z","https://github.com/vuejs/vitepress/issues/4192",0.68031067,{"description":2939,"labels":2940,"number":2942,"owner":2874,"repository":2875,"state":2885,"title":2943,"updated_at":2944,"url":2945,"score":2946},"### Describe the bug\n\nI've built a fairly comprehensive blog theme for my use. \r\n\r\nhttps://github.com/jcamp-code/vitepress-blog-theme\r\nhttps://vitepress-blog.netlify.app/blog/\r\n\r\nIt extends the default theme by using the slots and built in features of VitePress. As you can see from the demo, it works just fine. I was hoping to package it up and be able to use it across a few sites so that I could make updates in one place and just update the package of my sites.\r\n\r\nHowever, when I try that, the new site throws \r\n\r\n```\r\nUnknown file extension \".css\"\r\nUnknown file extension \".vue\"\r\n```\r\n\r\nIt's not processing these files from the package correctly\n\n### Reproduction\n\nhttps://github.com/jcamp-code/starter-vitepress-blog\n\n### Expected behavior\n\nWould like VitePress to properly pull in Vue and CSS files from packages\n\n### System Info\n\n```shell\nNA\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.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2941],{"name":2868,"color":2869},2242,"data loader files from package not working in dev","2023-05-02T00:04:02Z","https://github.com/vuejs/vitepress/issues/2242",0.68188393,{"description":2948,"labels":2949,"number":2950,"owner":2874,"repository":2875,"state":2885,"title":2951,"updated_at":2952,"url":2953,"score":2954},"### 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.6851889,{"description":2956,"labels":2957,"number":2959,"owner":2874,"repository":2875,"state":2885,"title":2960,"updated_at":2961,"url":2962,"score":2963},"### 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.",[2958],{"name":2894,"color":2895},2845,"Cannot use external theme with UnoCSS","2023-09-01T00:04:32Z","https://github.com/vuejs/vitepress/issues/2845",0.6858267,["Reactive",2965],{},["Set"],["ShallowReactive",2968],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f-3lzpBmL9VFGYVdDbnHVvXvxJl8ndscUfDsBMxXl6xk":-1},"/vuejs/vitepress/442"]