\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.67143625,{"description":2913,"labels":2914,"number":2916,"owner":2872,"repository":2873,"state":2899,"title":2917,"updated_at":2918,"url":2919,"score":2920},"### Describe the bug\n\nAn error occurred while building with `vitepress@1.0.0-alpha.13` (`vite@3.1.0`) and `ant-design-vue` **(dev working!)**\r\n> SyntaxError: Cannot use import statement outside a module\r\n\r\n\r\n\n\n### Reproduction\n\n# Steps:\r\n1. create a new project\r\n2. register a custom component `custom-button`\r\n3. use the `custom-button` in `index.md`\r\n4. building with vitepress\r\n\r\nReproduction repo: \r\nhttps://github.com/yeojongki/vitepress-cannot-use-import-statement-outside-a-module `(cd docs && pnpm i && pnpm build)`\r\n\n\n### Expected behavior\n\nsuccess build\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz\r\n Memory: 12.70 GB / 31.97 GB\r\n Binaries:\r\n Node: 16.13.0 - E:\\nodejs\\node.EXE\r\n Yarn: 1.22.17 - E:\\nodejs\\yarn.CMD\r\n npm: 8.1.3 - E:\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.27)\r\n Internet Explorer: 11.0.19041.1566\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.13 => 1.0.0-alpha.13\n```\n\n\n### Additional context\n\nrelative issue https://github.com/vuejs/vitepress/issues/324, but closed\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.",[2915],{"name":2896,"color":2897},1329,"SyntaxError: Cannot use import statement outside a module","2023-01-21T14:25:25Z","https://github.com/vuejs/vitepress/issues/1329",0.6716608,{"description":2922,"labels":2923,"number":2925,"owner":2872,"repository":2873,"state":2899,"title":2926,"updated_at":2927,"url":2928,"score":2929},"\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\nAfter running npx vitepress, I open the browser and load the address of http://localhost:3000, but I get a error.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\nPS D:\\桌面\\demo> npx vitepress\r\nvitepress v0.5.0\r\nvite v1.0.0-rc.4\r\nlistening at http://localhost:3000\r\n[vite] Failed to resolve module import \"vue/dist/vue.runtime.esm-bundler.js.0.0-rc.5@vuedist\u000bue.runtime.esm-bundler.js\". (imported by /@app/components/Debug.vue)\r\n\r\n**Expected behavior**\r\nGetting \"Hello Vitepress\" in browser.\r\n\r\n**System Info**\r\n- vitepress version: v0.5.0\r\n- vite version: v1.0.0-rc.4\r\n- Node version: 12.14.0\r\n- OS version:10.0.19041 暂缺 Build 19041\r\n\r\n**Additional context**\r\n尤大大,I am you big fan.\r\n",[2924],{"name":2896,"color":2897},65,"服务启动之后,进入地址报错","2023-01-21T16:25:36Z","https://github.com/vuejs/vitepress/issues/65",0.672491,{"description":2931,"labels":2932,"number":2934,"owner":2872,"repository":2873,"state":2899,"title":2935,"updated_at":2936,"url":2937,"score":2938},"### Describe the bug\r\n\r\nIt show error when I run `pnpm build`\r\n\r\n### Reproduction\r\n\r\n- vite config:\r\n```\r\nvite: {\r\n server: {\r\n // target: 'webworker',\r\n host: true,\r\n port: 3001,\r\n fs: {\r\n // for when developing with locally linked theme\r\n allow: ['../..']\r\n }\r\n },\r\n build: {\r\n // minify: 'terser',\r\n chunkSizeWarningLimit: Infinity\r\n },\r\n json: {\r\n stringify: true\r\n },\r\n ssr: {\r\n format: 'cjs',\r\n noExternal: []\r\n },\r\n legacy: {\r\n buildSsrCjsExternalHeuristics: true\r\n },\r\n plugins: [\r\n vueJsx(),\r\n SearchPlugin({\r\n tokenize: 'full'\r\n })\r\n ],\r\n css: {\r\n preprocessorOptions: {\r\n less: {\r\n javascriptEnabled: true\r\n }\r\n }\r\n }\r\n },\r\n\r\n vue: {\r\n reactivityTransform: true\r\n }\r\n```\r\n\r\n\r\n- build error:\r\n\r\n```\r\nbuild error:\r\n /Users/bou/working/code/practice/sinogear-frontend-component-vue/docs/node_modules/.pnpm/ant-design-vue@3.2.15_vue@3.2.45/node_modules/ant-design-vue/es/locale/zh_CN.js:2\r\nimport Pagination from '../vc-pagination/locale/zh_CN';\r\n^^^^^^\r\n\r\nSyntaxError: Cannot use import statement outside a module\r\n```\r\n\r\n### Expected behavior\r\n\r\nbuild successful\r\n\r\n### System Info\r\n\r\n```shell\r\n\"ant-design-vue\": \"^3.2.10\",\r\n \"@vue/theme\": \"^1.2.2\",\r\n \"vue\": \"^3.2.37\",\r\n \"vitepress\": \"^1.0.0-alpha.31\",\r\n \"vitepress-plugin-search\": \"1.0.4-alpha.15\",\r\n \"vitepress-theme-demoblock\": \"^2.0.0\"\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] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.vuejs.org).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[2933],{"name":2896,"color":2897},1695,"Build Error: Cannot use import statement outside a module","2023-01-21T14:16:57Z","https://github.com/vuejs/vitepress/issues/1695",0.6779463,{"description":2940,"labels":2941,"number":2945,"owner":2872,"repository":2873,"state":2899,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Describe the bug\r\n执行pnpm run docs:build\r\n打包的时候报错!\r\n\r\n\r\n\r\n### Reproduction\r\n\r\n当进行打包的时候会出现\r\nnode版本:18.18.0\r\npnpm版本:8.7.6\r\nwindows系统\r\n\r\n### Expected behavior\r\n\r\n可以正常打包不报错\r\n\r\n### System Info\r\n\r\n```Text\r\nCannot find package 'vue' imported from C:\\Users\\changbb\\node_modules\\vue-demi\\lib\\index.mjs\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.",[2942],{"name":2943,"color":2944},"need more info","bdbefc",2998,"Cannot find package 'vue' ","2023-09-29T00:04:11Z","https://github.com/vuejs/vitepress/issues/2998",0.6800381,{"description":2951,"labels":2952,"number":2953,"owner":2872,"repository":2873,"state":2899,"title":2954,"updated_at":2955,"url":2956,"score":2957},"Hi there,\r\n\r\nThe example in the documentation for customizing the theme does not work. It fails as the file/package cannot be found. This is the [specific line](https://github.com/vuejs/vitepress/blob/ea6cb00c3e9099d45fc236bff0f7c42a65d558dc/docs/guide/theming.md?plain=1#L97) that I am referring to, but I believe that the other lines that use this same thing will also fail.\r\n\r\nThe specific import that fails\r\n```javascript\r\nimport DefaultTheme from 'vitepress/theme'\r\n```\r\n\r\nI found an alternative import that works by looking into the downloaded node_module folder directly\r\n```javascript\r\nimport DefaultTheme from \"vitepress/dist/client/theme-default\";\r\n```\r\n\r\nIm not sure if this is the intended use or? If this is an actual issue, I can help with making a PR to update the docs, else if it is something that needs to be fixed with the deployment process so that the `DefaultTheme` can be exported from vitepress/theme then it would probably need help from someone else familiar with the process.\r\n\r\nThanks alot for your time!",[],442,"Example provided in theme documentation does not work","2023-01-21T16:20:15Z","https://github.com/vuejs/vitepress/issues/442",0.68455106,{"description":2959,"labels":2960,"number":2963,"owner":2872,"repository":2873,"state":2899,"title":2964,"updated_at":2965,"url":2966,"score":2967},"### Describe the bug\n\nwhen run `pnpm build`, it wil show this error message:\r\n```\r\nSyntaxError: The requested module '@vueuse/shared' does not provide an export named 'resolveRef'\r\n at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21)\r\n at async ModuleJob.run (node:internal/modules/esm/module_job:193:5)\r\n at async Promise.all (index 0)\r\n at async ESMLoader.import (node:internal/modules/esm/loader:337:24)\r\n at async build (file:///Users/bou/working/code/vue-pro/sinogear-frontend-pro-vue/node_modules/.pnpm/vitepress@1.0.0-alpha.30_less@4.1.3/node_modules/vitepress/dist/node/serve-e6561b64.js:42006:24)\r\n ELIFECYCLE Command failed with exit code 1.\r\n \r\n```\r\n\r\n\n\n### Reproduction\n\n- I have import a Self-developed components in `docs/.vitepress/theme/index.js`:\r\n\r\n```\r\nimport SgVue from '../../../lib/index.js';\r\n```\r\n\r\n- config in `/docs/.vitepress/config.js`:\r\n```\r\nimport { defineConfigWithTheme } from 'vitepress';\r\nimport vueJsx from '@vitejs/plugin-vue-jsx';\r\nimport baseConfig from '@vue/theme/config';\r\nimport { demoBlockPlugin } from 'vitepress-theme-demoblock';\r\nimport { SearchPlugin } from 'vitepress-plugin-search';\r\n\r\nimport { i18n, nav, sidebar } from './config/index';\r\n\r\nexport default defineConfigWithTheme({\r\n extends: baseConfig,\r\n lang: 'zh-CN',\r\n title: 'Sg Vue',\r\n description: 'Vue2.7.0+版本开发文档',\r\n srcDir: 'src',\r\n // srcExclude: ['tutorial/**/description.md'],\r\n scrollOffset: 'header',\r\n ignoreDeadLinks: true,\r\n head: [['meta', { name: 'theme-color', content: '#3c8772' }]],\r\n themeConfig: {\r\n nav,\r\n sidebar,\r\n appearance: false, // 开启 light/dark 模式\r\n // Placeholder of the i18n config for @vuejs-translations.\r\n i18n,\r\n footer: {\r\n copyright: `©2006-${new Date().getFullYear()}`\r\n }\r\n },\r\n\r\n markdown: {\r\n config(md) {\r\n // demoBlockPlugin 基于 Vitepress 的主题插件,在编写文档的时候增加 Vue 示例\r\n md.use(demoBlockPlugin, {\r\n cssPreprocessor: 'less',\r\n //markdown 中的vue代码被编译为了 vue 函数组件,需要把 import 转换为 require\r\n scriptImports: [\r\n \"import * as AntDesignVue from 'ant-design-vue'\",\r\n \"import * as SinogearVue from '../../../lib/index.js'\",\r\n \"import * as AntDesignVueIcons from '@ant-design/icons-vue'\"\r\n ],\r\n scriptReplaces: [\r\n {\r\n searchValue: /const ({ defineComponent as _defineComponent }) = Vue/g,\r\n replaceValue: 'const { defineComponent: _defineComponent } = Vue'\r\n },\r\n {\r\n searchValue: /import ({.*}) from 'ant-design-vue'/g,\r\n replaceValue: (s, s1) => `const ${s1} = AntDesignVue`\r\n },\r\n {\r\n searchValue: /import ({.*}) from '..\\/..\\/..\\/lib\\/index.js'/g,\r\n replaceValue: (s, s1) => `const ${s1} = SinogearVue`\r\n },\r\n {\r\n searchValue: /import ({.*}) from '@ant-design\\/icons-vue'/g,\r\n replaceValue: (s, s1) => `const ${s1} = AntDesignVueIcons`\r\n }\r\n ]\r\n });\r\n }\r\n },\r\n\r\n vite: {\r\n server: {\r\n host: true,\r\n port: 3001,\r\n fs: {\r\n // for when developing with locally linked theme\r\n allow: ['../..']\r\n }\r\n },\r\n build: {\r\n minify: 'terser',\r\n chunkSizeWarningLimit: Infinity\r\n },\r\n json: {\r\n stringify: true\r\n },\r\n plugins: [\r\n vueJsx(),\r\n SearchPlugin({\r\n tokenize: 'full'\r\n })\r\n ],\r\n css: {\r\n preprocessorOptions: {\r\n less: {\r\n javascriptEnabled: true\r\n }\r\n }\r\n }\r\n },\r\n\r\n vue: {\r\n reactivityTransform: true\r\n }\r\n});\r\n\r\n```\r\n\r\n- It's OK on Dev\r\n\r\n- Run `pnpm build`\r\n\n\n### Expected behavior\n\nno error show \n\n### System Info\n\n```shell\n`\"vitepress\": \"^1.0.0-alpha.28\"`\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.",[2961,2962],{"name":2943,"color":2944},{"name":2869,"color":2870},1679,"The requested module '@vueuse/shared' does not provide an export named 'resolveRef'","2023-08-13T00:04:21Z","https://github.com/vuejs/vitepress/issues/1679",0.6867904,["Reactive",2969],{},["Set"],["ShallowReactive",2972],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fziMJXTTNhlIHpSU82Q50QEJ8lXL6gNR8qwbLBYLF87g":-1},"/vuejs/vitepress/4192"]