\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.67980653,{"description":2890,"labels":2891,"number":2895,"owner":2866,"repository":2867,"state":2868,"title":2896,"updated_at":2897,"url":2898,"score":2899},"### Describe the bug\n\nI want to use the vue component in vitepress. I have read the documentation on the official website, but when I do it, I encounter an error like this.\r\n```bash\r\n[plugin:vite:vue] Tags with side effect (\u003Cscript> and \u003Cstyle>) are ignored in client component templates.\r\n```\r\n\r\nI don't understand what I'm encountering, I just want to achieve the effect here in this vue document\r\n\r\n> https://cn.vuejs.org/guide/reusability/composables.html#vs-react-hooks\r\n\r\n\r\n\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-dn63jg?file=docs%2Fhooks%2FuseMouse.js,docs%2Fexample.md\n\n### Expected behavior\n\nThe documentation on the official website makes me understand the difficulty or the need for a better demo?\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 11 10.0.22631\r\n CPU: (20) x64 13th Gen Intel(R) CoreT i7-13800H\r\n Memory: 17.07 GB / 31.74 GB\r\n Binaries:\r\n Node: 20.11.0 - ~\\AppData\\Local\\pnpm\\node.EXE\r\n npm: 10.2.4 - ~\\AppData\\Local\\pnpm\\npm.CMD\r\n pnpm: 8.14.1 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (120.0.2210.133)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: 1.0.0-rc.39 => 1.0.0-rc.39\n```\n\n\n### Additional context\n\nPlease tell me the correct way to write it, thank you\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.",[2892],{"name":2893,"color":2894},"bug: pending triage","e99695",3485,"Using vue to report errors in markdown","2024-01-29T00:04:28Z","https://github.com/vuejs/vitepress/issues/3485",0.68356824,{"description":2901,"labels":2902,"number":2904,"owner":2866,"repository":2867,"state":2868,"title":2905,"updated_at":2906,"url":2907,"score":2908},"### Describe the bug\n\nI want to extend Default theme by custom .scss and .vue files,but when I run 'yarn docs:dev', it output a error \"No loader is configured for \".scss\"\n\n### Reproduction\n\n1. new file index.scss \r\n2. import index.scss\r\n3. yarn docs:dev\r\n\n\n### Expected behavior\n\nnormal operation by import .scss and .vue files\r\n\n\n### System Info\n\n```Text\nmac chrome\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.",[2903],{"name":2893,"color":2894},3050,"No loader is configured for \".scss\" \".vue\"","2023-10-15T00:04:49Z","https://github.com/vuejs/vitepress/issues/3050",0.68748933,{"description":2910,"labels":2911,"number":2912,"owner":2866,"repository":2867,"state":2868,"title":2913,"updated_at":2914,"url":2915,"score":2916},"\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\nPackage and deploy to GitHub, no resource package 404 error found\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior: Package and deploy to GitHub, no resource package 404 error found\r\n\r\n**Expected behavior**\r\nPackage and deploy to GitHub, no resource package 404 error found\r\n\r\n**System Info**\r\n- vitepress version: 0.7.4\r\n- vite version: 1.20.0\r\n- Node version: 12.13.1\r\n- OS version: windows10\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[],124,"`_assets` folder not accessible when deploying to GitHub Page","2023-01-21T14:20:52Z","https://github.com/vuejs/vitepress/issues/124",0.68953705,{"description":2918,"labels":2919,"number":2920,"owner":2866,"repository":2867,"state":2868,"title":2921,"updated_at":2922,"url":2923,"score":2924},"\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\nI started building a custom theme and haven't imported any css to `index.js` yet. Running `vitepress build` throws an error:\r\n```\r\n$ vitepress build\r\nvitepress v0.11.4\r\nvite v2.0.0-beta.35\r\n✓ building client + server bundles...\r\n✖ rendering pages...\r\nbuild error:\r\n TypeError: Cannot read property 'fileName' of undefined\r\n at Object.renderPage (/Users/fistmenaruto/Projects/domnantas.lt/node_modules/vitepress/dist/node/build/render.js:53:61)\r\n at async Object.build (/Users/fistmenaruto/Projects/domnantas.lt/node_modules/vitepress/dist/node/build/build.js:29:17)\r\nerror Command failed with exit code 1.\r\n```\r\n\r\n`render.js:53` is trying to get `cssChunk.fileName`:\r\n```jsx\r\n\u003Clink rel=\"stylesheet\" href=\"${siteData.base}${cssChunk.fileName}\">\r\n```\r\nbut it is undefined since there are not css chunks.\r\n\r\nThe same happens if you try to import an empty .css file to `index.js`.\r\n\r\n`vitepress dev` does not throw the error.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n- Create an empty custom theme as described in the docs: https://vitepress.vuejs.org/guide/customization.html#customization\r\n(notice how there are no .css imports in the docs either)\r\n- Run `vitepress build`\r\n\r\nReproduction repo: https://github.com/domnantas/domnantas.lt/tree/no-css-chunks\r\n\r\n**Expected behavior**\r\nBuild should not fail when building without css\r\n\r\n**System Info**\r\n- vitepress version: v0.11.4\r\n- vite version: v2.0.0-beta.35\r\n- Node version: v15.5.1\r\n- OS version: MacOS 11.0.1\r\n\r\n**Additional context**\r\n```js\r\n`\r\n...\r\n${cssChunk ? `\u003Clink rel=\"stylesheet\" href=\"${siteData.base}${cssChunk.fileName}\">` : \"\"}\r\n...\r\n`\r\n```\r\nwould fix this, but maybe there are better ways\r\n",[],209,"Build fails with custom theme and no css","2023-01-21T16:22:25Z","https://github.com/vuejs/vitepress/issues/209",0.6895817,{"description":2926,"labels":2927,"number":2931,"owner":2866,"repository":2867,"state":2868,"title":2932,"updated_at":2933,"url":2934,"score":2935},"### 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",[2928],{"name":2929,"color":2930},"invalid","ffffff",530,"\"Import Code Snippets\" not working","2023-01-21T16:04:03Z","https://github.com/vuejs/vitepress/issues/530",0.6906279,{"description":2937,"labels":2938,"number":2942,"owner":2866,"repository":2867,"state":2868,"title":2943,"updated_at":2944,"url":2945,"score":2946},"### Describe the bug\n\ndocs:build fails element-plus, when used with unplugin-vue-components and ssr: false\r\n\r\n```\r\n Components({\r\n dirs: ['components'],\r\n include: [/\\.vue$/, /\\.md$/],\r\n resolvers: [ElementPlusResolver({ ssr: false })]\r\n })\r\n\r\n```\r\n\r\nWhile changing to ssr:true gets the build to succeed, with this CSS isn't loaded. \n\n### Reproduction\n\n1. Close the repo https://github.com/akil-rails/vitepress-with-element-plus\r\n2. pnpm docs:build\r\n\r\nBuild fails with the following error: \r\n\r\n```\r\n> vitepress build docs\r\n\r\nvitepress v1.0.0-alpha.4\r\n⠸ building client + server bundles...warnings when minifying css:\r\n▲ [WARNING] \"@charset\" must be the first rule in the file\r\n\r\n \u003Cstdin>:3820:0:\r\n 3820 │ @charset \"UTF-8\";:root{--el-color-white:#ffffff;--el-color-black...\r\n ╵ ~~~~~~~~\r\n\r\n This rule cannot come before a \"@charset\" rule\r\n\r\n \u003Cstdin>:1:0:\r\n 1 │ @font-face {\r\n ╵ ^\r\n\r\n\r\n✓ building client + server bundles...\r\n⠋ rendering pages...Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/node_modules/.pnpm/element-plus@2.2.13_vue@3.2.37/node_modules/element-plus/es/index.mjs not supported.\r\nInstead change the require of /Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/node_modules/.pnpm/element-plus@2.2.13_vue@3.2.37/node_modules/element-plus/es/index.mjs to a dynamic import() which is available in all CommonJS modules.\r\n at Module.\u003Canonymous> (/Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/docs/.vitepress/.temp/index.md.js:3:10)\r\n at /Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/docs/.vitepress/.temp/app.js:4045:50\r\n at async loadPage (/Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/docs/.vitepress/.temp/app.js:216:16) {\r\n code: 'ERR_REQUIRE_ESM'\r\n}\r\n✖ rendering pages...\r\nbuild error:\r\n Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/node_modules/.pnpm/element-plus@2.2.13_vue@3.2.37/node_modules/element-plus/es/index.mjs not supported.\r\nInstead change the require of /Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/node_modules/.pnpm/element-plus@2.2.13_vue@3.2.37/node_modules/element-plus/es/index.mjs to a dynamic import() which is available in all CommonJS modules.\r\n at Module.\u003Canonymous> (/Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/docs/.vitepress/.temp/index.md.js:3:10)\r\n at async Promise.all (index 0)\r\n at async renderPage (file:///Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/node_modules/.pnpm/vitepress@1.0.0-alpha.4/node_modules/vitepress/dist/node/serve-05342c3d.js:39555:28)\r\n at async build (file:///Users/akhileshkataria/Code/spikes/vitepress-with-element-plus/node_modules/.pnpm/vitepress@1.0.0-alpha.4/node_modules/vitepress/dist/node/serve-05342c3d.js:39853:9) {\r\n code: 'ERR_REQUIRE_ESM'\r\n\r\n```\r\n\r\n\n\n### Expected behavior\n\nThe build should succeed.\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 11.6.7\r\n CPU: (8) x64 Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz\r\n Memory: 510.54 MB / 16.00 GB\r\n Shell: 3.2.57 - /bin/bash\r\n Binaries:\r\n Node: 16.15.1 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 8.11.0 - /usr/local/bin/npm\r\n Browsers:\r\n Chrome: 103.0.5060.53\r\n Safari: 15.5\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.4 => 1.0.0-alpha.4\n```\n\n\n### Additional context\n\nelement-plus has been discussed earlier: https://github.com/vuejs/vitepress/issues/603\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.",[2939],{"name":2940,"color":2941},"build","377ba8",1164,"Unable to use element-plus with vitepress: works in dev mode, but fails to build","2023-01-21T14:25:26Z","https://github.com/vuejs/vitepress/issues/1164",0.6907357,{"description":2948,"labels":2949,"number":2953,"owner":2866,"repository":2867,"state":2868,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Describe the bug\n\nI've been following the guide on how to set up Vitepress with a custom theme, and when I try to load a diferent vue file as a Layout it give me an error: \r\n\r\n> No loader is configured for \".vue\" files: docs/.vitepress/theme/Layout.vue\r\n\r\nWhat is more weird is that if I substitute that file with a function and and run serve the project in dev mode, while under HMR I can get it to work by replacing it back with the vue file.\n\n### Reproduction\n\nClone\r\n`git clone git@github.com:Beriu/blog.git`\r\n\r\nInstall Deps\r\n`cd blog && npm install`\r\n\r\nRun dev command\r\n`npm run docs:dev`\n\n### Expected behavior\n\nTo properly load the vue file\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 4.19 Ubuntu 20.04.1 LTS (Focal Fossa)\r\n CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz\r\n Memory: 7.84 GB / 12.36 GB\r\n Container: Yes\r\n Shell: 5.8 - /usr/bin/zsh\r\n Binaries:\r\n Node: 16.8.0 - ~/.nvm/versions/node/v16.8.0/bin/node\r\n npm: 7.21.0 - ~/.nvm/versions/node/v16.8.0/bin/npm\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4\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.",[2950],{"name":2951,"color":2952},"question","5D5FAE",1035,"Unable to load Layout.vue file (No loader is configured for \".vue\" files)","2023-01-21T14:30:16Z","https://github.com/vuejs/vitepress/issues/1035",0.69167393,["Reactive",2959],{},["Set"],["ShallowReactive",2962],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fx0Tf4wQFEO8WrV4XttfZW2x2KNqcOgrLnL_Ez8iWops":-1},"/vuejs/vitepress/2242"]