\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.66383356,{"description":2902,"labels":2903,"number":2907,"owner":2874,"repository":2875,"state":2876,"title":2908,"updated_at":2909,"url":2910,"score":2911},"### Describe the bug\n\nUpon following the starter instructions in the [docs](https://vitepress.vuejs.org/guide/getting-started.html), running `yarn docs:dev` yields a blank webpage at `localhost:3000` with the error shown below in the console.\r\n\r\n\r\n\n\n### Reproduction\n\nFollowing the instructions outlined on the Getting Started page on [vitepress.vuejs.org](https://vitepress.vuejs.org/guide/getting-started.html).\n\n### Expected behavior\n\n\"Hello Vitepress\" should be rendered to the screen with no error messages in the console.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.13 Fedora 34 (Workstation Edition) 34 (Workstation Edition)\r\n CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz\r\n Memory: 2.30 GB / 15.28 GB\r\n Container: Yes\r\n Shell: 5.1.0 - /bin/bash\r\n Binaries:\r\n Node: 14.17.0 - /usr/bin/node\r\n Yarn: 1.22.5 - /usr/bin/yarn\r\n npm: 7.20.5 - /usr/local/bin/npm\r\n Browsers:\r\n Chrome: 92.0.4515.131\r\n Firefox: 90.0.2\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.",[2904],{"name":2905,"color":2906},"bug: pending triage","e99695",355,"import not found: defineEmit","2023-01-21T16:22:12Z","https://github.com/vuejs/vitepress/issues/355",0.6734911,{"description":2913,"labels":2914,"number":2916,"owner":2874,"repository":2875,"state":2876,"title":2917,"updated_at":2918,"url":2919,"score":2920},"**Describe the bug**\r\n\r\nHMR not working on import code snippets\r\n\r\n**To Reproduce**\r\n\r\nSteps to reproduce the behavior: \r\n\r\nsee this [video](https://www.youtube.com/watch?v=pRhWVOUJ-IQ)\r\n\r\n- git clone https://github.com/febug/vitepress-import-code-snippet.git\r\n- yarn\r\n- yarn serve\r\n- edit `hello.vue` content\r\n\r\n**Expected behavior**\r\n\r\nauto update code\r\n\r\n**System Info**\r\n- vitepress version: 0.7.2\r\n- Node version: v13.14.0\r\n- OS version: osx 10.15.3\r\n\r\n",[2915],{"name":2868,"color":2869},117,"HMR not working on import code snippets","2023-10-01T00:04:50Z","https://github.com/vuejs/vitepress/issues/117",0.6737814,{"description":2922,"labels":2923,"number":2925,"owner":2874,"repository":2875,"state":2876,"title":2926,"updated_at":2927,"url":2928,"score":2929},"### Describe the bug\n\n```\r\n▶ yarn build:docs\r\nyarn run v1.22.10\r\n$ vitepress build docs\r\nvitepress v0.15.6\r\nvite v2.4.1\r\n✓ building client + server bundles...\r\n⠋ rendering pages...\r\n✖ rendering pages...\r\nbuild error:\r\n TypeError: Cannot read property 'imports' of undefined\r\n at resolvePageImports (x/node_modules/vitepress/dist/node/build/render.js:81:22)\r\n at Object.renderPage (x/node_modules/vitepress/dist/node/build/render.js:35:12)\r\n at async Object.build (x/node_modules/vitepress/dist/node/build/build.js:29:17)\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\nhttps://github.com/vuejs/vitepress/blob/master/src/node/build/render.ts#L115\r\n\n\n### Reproduction\n\n``` bash\r\ncd docs\r\nln -s ../CHANGELOG.md changelog.md\r\nln -s ../packages components \r\n```\n\n### Expected behavior\n\n`build` success same as `dev`\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 11.4\r\n CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz\r\n Memory: 710.10 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 14.17.0 - /usr/local/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 6.14.13 - /usr/local/bin/npm\r\n Watchman: 4.9.0 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 91.0.4472.164\r\n Edge: 81.0.416.77\r\n Firefox: 87.0\r\n Safari: 14.1.1\r\n Safari Technology Preview: 15.0\r\n npmPackages:\r\n vitepress: ^0.15.6 => 0.15.6\n```\n\n\n### Additional context\n\nThe following code works fine\r\n```\r\n return Array.from(new Set([\r\n ...indexChunk.imports,\r\n ...indexChunk.dynamicImports,\r\n ...(pageChunk?.imports|| []),\r\n ...(pageChunk?.dynamicImports || [])\r\n ].filter(Boolean)));\r\n```\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.",[2924],{"name":2905,"color":2906},335,"build failed with symbolic links","2023-01-21T16:20:24Z","https://github.com/vuejs/vitepress/issues/335",0.6738941,{"description":2931,"labels":2932,"number":2934,"owner":2874,"repository":2875,"state":2876,"title":2935,"updated_at":2936,"url":2937,"score":2938},"### Describe the bug\n\nI referenced a globally registered component in the markdown document of vitepress. When I used it, the error was reported as follows:\r\n**[vitepress] Internal server error: At least one \u003Ctemplate> or \u003Cscript> is required in a single file component.**\r\n\r\n\r\n\n\n### Reproduction\n\nCreate vite.config.js in the vitepress root directory, the content is as follows:\r\n\r\n```\r\nimport { defineConfig } from \"vite\";\r\nimport vueJsx from \"@vitejs/plugin-vue-jsx\";\r\nimport vue from \"@vitejs/plugin-vue\"\r\nexport default defineConfig({\r\n plugins: [\r\n vue(),\r\n vueJsx(),\r\n ],\r\n});\r\n```\n\n### Expected behavior\n\nRender component content correctly\n\n### System Info\n\n```shell\nnode 16\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.",[2933],{"name":2885,"color":2886},2095,"vitepress not support jsx file?","2023-03-29T00:04:14Z","https://github.com/vuejs/vitepress/issues/2095",0.67841876,{"description":2940,"labels":2941,"number":2943,"owner":2874,"repository":2875,"state":2876,"title":2944,"updated_at":2945,"url":2946,"score":2947},"### Describe the bug\n\nall auto import components in dev mode is ok.\nall auto import components in build mode is ok, when there have no 'script' tag in md files\n\nif md file have 'script' tag of one page. the page's auto import component will not resolve in **build mode**!!!!\n\n### Reproduction\n\nit's an empty vitepress project.\n\n[Reproduction URL](https://github.com/huchaomin/vitepress-auto-import-bug)\n\n### Expected behavior\n\n\u003Cimg width=\"900\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/76a803ce-949b-4ae2-b229-32484d930cde\" />\n\n\u003Cimg width=\"821\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d4b60aea-4b7c-422f-8c0e-339be12dbe42\" />\n\n\u003Cimg width=\"901\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/691bb9b3-a61d-4f15-8426-68416f7340da\" />\n\n\u003Cimg width=\"915\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9c8470cc-7c45-476a-aaf1-3f990a1c57f0\" />\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 11 10.0.22631\n CPU: (28) x64 Intel(R) Core(TM) i7-14700KF\n Memory: 15.99 GB / 31.82 GB\n Binaries:\n Node: 20.17.0 - D:\\Program Files\\nodejs\\node.EXE\n npm: 10.8.2 - D:\\Program Files\\nodejs\\npm.CMD\n pnpm: 9.8.0 - D:\\Program Files\\nodejs\\pnpm.CMD\n Browsers:\n Edge: Chromium (127.0.2651.74)\n Internet Explorer: 11.0.22621.3527\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\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.",[2942],{"name":2905,"color":2906},4519,"\"vitepress\" work with \"unplugin-vue-components\" bug","2025-02-02T04:41:47Z","https://github.com/vuejs/vitepress/issues/4519",0.6791268,{"description":2949,"labels":2950,"number":2951,"owner":2874,"repository":2875,"state":2876,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Is your feature request related to a problem? Please describe.\r\n\r\nIn order to create good documentation of a standalone Vue component, we want to show many usage examples.\r\n\r\nEvery usage example is a Vue file.\r\n\r\nWe need to be able to import a Vue file in Vitepress, show its source code as CodeBlock.\r\n- Not just a single code block like you can already do in Vitepress, but a Codeblock with tabs on top that split up the source code in `template` / `script` / `style` tabs.\r\n- Also, another tab should say `example` rendering the actual imported Vue component.\r\n\r\n\r\n### Describe the solution you'd like\r\n\r\nThe ideal syntax would look something like this:\r\n```html\r\n\u003CCodeBlockComponent filename=\"blitz-form/Basics - Basic Example\" />\r\n```\r\nAnd here is a video of how it would render in Vitepress:\r\n\r\nhttps://user-images.githubusercontent.com/3253920/140631280-adae2d0b-47d9-4172-b105-f6f4ee5f41f4.mp4\r\n\r\n(I have styled this a little bit to fit my docs style, but of course the styling can be way more bare-bones and we can overwrite the styling with CSS.)\r\n\r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\nI actually already finished this feature for VitePress. I created my custom solution.\r\n\r\nUnder the hood I'm using a combination of these import methods:\r\n```js\r\nimport(`../docs/${filename}.vue`) // for the component\r\n// and\r\nimport(`../docs/${filename}.vue?raw`) // for the source code\r\n```\r\n\r\n~~Everything works when I'm using the VitePress development server. However, as soon as I build and deploy my code to a hosting service, all the Code Blocks break.~~\r\n\r\n~~I searched a lot for solutions, but this is not my strongest point. This past week I tried a bunch of things but still haven't found out how to make it work.~~\r\n\r\n(See next comment, where I explain how I fixed it)\r\n\r\n### Additional context\r\n\r\nI would love to request for an official solution for what I'm trying to do.\r\n\r\nI believe a lot of developers who want to share a Vue component and whip up a quick VitePress documentation about their component, would love this feature.\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.",[],437,"FR: Code Block that renders Vue file component and source code","2023-01-29T00:04:23Z","https://github.com/vuejs/vitepress/issues/437",0.681547,{"description":2957,"labels":2958,"number":2959,"owner":2874,"repository":2875,"state":2876,"title":2960,"updated_at":2961,"url":2962,"score":2963},"\r\n**Describe the bug**\r\nvitepress dev docs working but vitepress build docs has errors.\r\n\r\n```\r\n> vitepress dev docs\r\n\r\nvitepress v0.15.3\r\nvite v2.3.7\r\nD:\\vue3-openlayers\\docs\\.vitepress\\config.js\r\n\r\n vite v2.3.7 dev server running at:\r\n\r\n > Local: http://localhost:3000/\r\n > Network: use `--host` to expose\r\n[@vue/compiler-sfc] \u003Cscript setup> is still an experimental proposal.\r\nFollow its status at https://github.com/vuejs/rfcs/pull/227.\r\n\r\n[@vue/compiler-sfc] When using experimental features,\r\nit is recommended to pin your vue dependencies to exact versions to avoid breakage.\r\n```\r\n\r\n```\r\n> vitepress build docs\r\n\r\nvitepress v0.15.3\r\nvite v2.3.7\r\n⠧ building client + server bundles...\r\n(!) Some chunks are larger than 500kb after minification. Consider:\r\n- Using dynamic import() to code-split the application\r\n- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks\r\n- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.\r\n✓ building client + server bundles...\r\n✖ rendering pages...\r\nbuild error:\r\n D:\\vue3-openlayers\\node_modules\\ol\\Map.js:17\r\nimport CompositeMapRenderer from './renderer/Composite.js';\r\n^^^^^^\r\n\r\nSyntaxError: Cannot use import statement outside a module\r\n at wrapSafe (internal/modules/cjs/loader.js:1001:16)\r\n at Module._compile (internal/modules/cjs/loader.js:1049:27)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)\r\n at Module.load (internal/modules/cjs/loader.js:950:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:791:14)\r\n at Module.require (internal/modules/cjs/loader.js:974:19)\r\n at require (internal/modules/cjs/helpers.js:88:18)\r\n at Module.\u003Canonymous> (D:\\vue3-openlayers\\node_modules\\vitepress\\dist\\client\\app\\temp\\app.js:25:13)\r\n at Module._compile (internal/modules/cjs/loader.js:1085:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! vue3-openlayers@0.1.0 docs:build: `vitepress build docs`\r\nnpm ERR! Exit status 1\r\n```\r\n\r\n**Expected behavior**\r\n\r\nsuccess build\r\n\r\n**System Info**\r\n- vitepress version: ^0.15.3\r\n- vite version: 2.3.7\r\n- Node version: v14.13.0\r\n- OS version: win 10\r\n\r\n",[],324,"dev works but build not (Cannot use import statement outside a module)","2023-01-21T14:28:40Z","https://github.com/vuejs/vitepress/issues/324",0.6843881,["Reactive",2965],{},["Set"],["ShallowReactive",2968],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f-H9V4g8ZlABKWy9OdBNNVpbDJwLYivI7ePdtW9sekMQ":-1},"/vuejs/vitepress/530"]