\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":3053,"labels":3054,"number":3058,"owner":3020,"repository":3021,"state":3031,"title":3059,"updated_at":3060,"url":3061,"score":3062},"### 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.",[3055],{"name":3056,"color":3057},"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":3064,"labels":3065,"number":3067,"owner":3020,"repository":3021,"state":3031,"title":3068,"updated_at":3069,"url":3070,"score":3071},"### 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.",[3066],{"name":3056,"color":3057},3050,"No loader is configured for \".scss\" \".vue\"","2023-10-15T00:04:49Z","https://github.com/vuejs/vitepress/issues/3050",0.68748933,{"description":3073,"labels":3074,"number":3075,"owner":3020,"repository":3021,"state":3031,"title":3076,"updated_at":3077,"url":3078,"score":3079},"\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":3081,"labels":3082,"number":3083,"owner":3020,"repository":3021,"state":3031,"title":3084,"updated_at":3085,"url":3086,"score":3087},"\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":3089,"labels":3090,"number":3094,"owner":3020,"repository":3021,"state":3031,"title":3095,"updated_at":3096,"url":3097,"score":3098},"### 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",[3091],{"name":3092,"color":3093},"invalid","ffffff",530,"\"Import Code Snippets\" not working","2023-01-21T16:04:03Z","https://github.com/vuejs/vitepress/issues/530",0.69062793,{"description":3100,"labels":3101,"number":3105,"owner":3020,"repository":3021,"state":3031,"title":3106,"updated_at":3107,"url":3108,"score":3109},"### 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.",[3102],{"name":3103,"color":3104},"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,["Reactive",3111],{},["Set"],["ShallowReactive",3114],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fx0Tf4wQFEO8WrV4XttfZW2x2KNqcOgrLnL_Ez8iWops":-1},"/vuejs/vitepress/2242"]