\n\n\n```vue\n\u003Cscript setup>\nimport { FwbButton } from 'flowbite-vue'\n\u003C/script>\n\u003Ctemplate>\n \u003Cdiv>\n \u003Cfwb-button color=\"default\">Default\u003C/fwb-button>\n \u003C/div>\n\u003C/template>\n```\n\n### Reproduction\n\nhttps://github.com/jk2K/testvitepress\n\ntech stack\n1. https://flowbite-vue.com/pages/getting-started\n2. tailwindcss v4\n\n### Expected behavior\n\n\u003Cimg width=\"103\" height=\"50\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/7bffdf53-2faf-4257-87c2-4f60511b7060\" />\n\n### System Info\n\n```Text\nSystem:\n OS: macOS 15.5\n CPU: (14) arm64 Apple M4 Pro\n Memory: 218.33 MB / 48.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node\n npm: 10.9.2 - ~/.nvm/versions/node/v22.16.0/bin/npm\n pnpm: 10.11.0 - /opt/homebrew/bin/pnpm\n Browsers:\n Chrome: 138.0.7204.159\n Safari: 18.5\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.",[3061],{"name":3020,"color":3021},4856,"vitepress not work for flowbite-vue","2025-07-25T10:13:26Z","https://github.com/vuejs/vitepress/issues/4856",0.6599129,{"description":3068,"labels":3069,"number":3070,"owner":3023,"repository":3024,"state":3025,"title":3071,"updated_at":3072,"url":3073,"score":3074},"### Is your feature request related to a problem? Please describe.\n\nBefore, I want to use the third-party component library [element-plus](https://element-plus.gitee.io/#/zh-CN) in vuepress, which can be directly in [clientAppEnhance.ts](https://v2.vuepress.vuejs.org/zh/reference/client-api.html#%E8%BF%9B%E9%98%B6%E8%83%BD%E5%8A%9B) folder for app Use(). The code is as follows:\r\n\r\n```js\r\nimport { defineClientAppEnhance } from '@vuepress/client'\r\n\r\nimport elementPlus from 'element-pus'\r\n\r\nexport default defineClientAppEnhance(({ app, router, siteData }) => {\r\n app.use(elementPlus)\r\n})\r\n```\r\n\r\nSo how do I use third-party libraries in vitepress?\n\n### Describe the solution you'd like\n\nI hope to supplement the detailed configuration of the [document](https://vitepress.vuejs.org/). Now the content of the document configuration of vitepress is too few, and it is difficult for novices to get started with vitepress\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.vuejs.org).\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.",[],603,"How to use third-party libraries?","2023-01-21T14:28:45Z","https://github.com/vuejs/vitepress/issues/603",0.6618174,{"description":3076,"labels":3077,"number":3079,"owner":3023,"repository":3024,"state":3025,"title":3080,"updated_at":3081,"url":3082,"score":3083},"### Describe the bug\r\n\r\nI tried to run vitepress through `npx` without installing it in the local package. And starting from 0.21.4 (I didn't narrow down the version number precisely) `npx vitepress build` won't work, but `npx vitepress dev` works fine.\r\n\r\n```bash\r\n> npx vitepress build docs\r\nvitepress v0.21.4\r\n- building client + server bundles...\r\n✓ building client + server bundles...\r\n- rendering pages...\r\n✖ rendering pages...\r\nbuild error:\r\n Error: Cannot find module 'vue'\r\nRequire stack:\r\n- /home/runner/work/esbuild-dev/esbuild-dev/docs/.vitepress/.temp/app.js\r\n```\r\n\r\nFull output see the table below:\r\n\r\n| version | behavior | log |\r\n|---------|----------|-----|\r\n| 0.20.9 | `dev` fine, `build` fine | [gh action log](https://github.com/hyrious/esbuild-dev/runs/4613503146?check_suite_focus=true#step:5:12) |\r\n| 0.21.4 ~ 0.22.3 | `dev` fine, `build` error | [gh action log](https://github.com/hyrious/esbuild-dev/runs/4824411193?check_suite_focus=true#step:5:18) |\r\n\r\n### Reproduction\r\n\r\nTry this command without installing vitepress:\r\n\r\n```bash\r\nnpx vitepress build docs\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\nThe `build` command should work.\r\n\r\n### System Info\r\n\r\n```shell\r\n System:\r\n OS: Windows 10 10.0.19044\r\n CPU: (4) x64 Intel(R) Core(TM) i5-4200H CPU @ 2.80GHz\r\n Memory: 6.00 GB / 11.89 GB\r\n Binaries:\r\n Node: 16.13.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.17 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.5.2 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (98.0.1108.62)\r\n Internet Explorer: 11.0.19041.1202\r\n```\r\n\r\n### Additional context\r\n\r\nI noticed #324 has similar situation but the error message differs.\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.",[3078],{"name":3020,"color":3021},557,"[npx] Cannot find module 'vue'","2023-01-21T16:04:27Z","https://github.com/vuejs/vitepress/issues/557",0.66766536,{"description":3085,"labels":3086,"number":3088,"owner":3023,"repository":3024,"state":3025,"title":3089,"updated_at":3090,"url":3091,"score":3092},"\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\nOn current `master`, `yarn build` failed due to typing error.\r\n\r\n```\r\nsrc/client/app/utils.ts:20:32 - error TS2339: Property 'env' does not exist on type 'ImportMeta'.\r\n\r\n20 const base = import.meta.env.BASE_URL\r\n ~~~\r\n\r\nFound 8 errors.\r\n```\r\n\r\n**To Reproduce**\r\n- Clone, `yarn` and then `yarn build`\r\n\r\n**Additional context**\r\nFix PR made: https://github.com/vuejs/vitepress/pull/44\r\n",[3087],{"name":3020,"color":3021},47,"Failed to build ","2023-01-21T16:25:38Z","https://github.com/vuejs/vitepress/issues/47",0.6731068,{"description":3094,"labels":3095,"number":3097,"owner":3023,"repository":3024,"state":3025,"title":3098,"updated_at":3099,"url":3100,"score":3101},"### Describe the bug\n\nI am writing the package of `controllable-animate` and preparing write doc for this package \r\n\r\nwhen I run npm run docs:dev it works just fine\r\nbut when I run npm run docs:build it failed\r\nand shows an error message:\r\n```sh\r\n✓ building client + server bundles...\r\nbuild error:\r\n ReferenceError: document is not defined\r\n at file:///Users/songwufan/Desktop/newPro/controllable-animate/docs/main/.vitepress/.temp/app.js:4380:3\r\n at ModuleJob.run (internal/modules/esm/module_job.js:183:25)\r\n at async Loader.import (internal/modules/esm/loader.js:178:24)\r\n at async build (file:///Users/songwufan/Desktop/newPro/controllable-animate/node_modules/.pnpm/vitepress@1.0.0-alpha.29_tbpndr44ulefs3hehwpi2mkf2y/node_modules/vitepress/dist/node/serve-fcdc8868.js:42002:24)\r\n```\r\nreproduce steps: \r\nFirst: I try to use `docuement` in vue directive like this: \r\n```ts\r\nif (typeof window !== undefined) {\r\n root = document.documentElement || document.body\r\n}\r\n```\r\nSecond: I use this package in my code :main/.vitepress/theme/index.ts\r\n```ts\r\nimport {\r\n vcontrollableanimate,\r\n} from 'controllable-animate'\r\nexport default {\r\n ...DefaultTheme,\r\n enhanceApp({ app }) {\r\n // app.Plugin\r\n app.directive('controllable-animate', vcontrollableanimate)\r\n },\r\n}\r\n```\n\n### Reproduction\n\nnone\n\n### Expected behavior\n\nIt should work in dev and build mode.\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 12.6\r\n CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz\r\n Memory: 103.34 MB / 8.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node\r\n Yarn: 1.22.17 - /usr/local/bin/yarn\r\n npm: 6.14.16 - ~/.nvm/versions/node/v14.19.0/bin/npm\r\n Watchman: 4.9.0 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 107.0.5304.110\r\n Chrome Canary: 110.0.5434.0\r\n Firefox: 97.0.2\r\n Firefox Developer Edition: 106.0\r\n Safari: 15.6.1\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.29 => 1.0.0-alpha.29\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.",[3096],{"name":3020,"color":3021},1638,"Can't build vitepress when I use npm package","2023-01-21T14:20:37Z","https://github.com/vuejs/vitepress/issues/1638",0.6751969,{"description":3103,"labels":3104,"number":3106,"owner":3023,"repository":3024,"state":3025,"title":3107,"updated_at":3108,"url":3109,"score":3110},"### Describe the bug\r\n\r\nSince after vitepress@1.0.0-alpha.66 has update vueuse to v10.x, while elment-plus@2.3.3 still using vueuse@9.x, build will fail like that:\r\n\r\n```\r\nfile:///home/projects/vite-prhpmo/docs/.vitepress/.temp/app.js:3\r\nimport { isClient, isNumber, useEventListener, useThrottleFn, useMediaQuery, useWindowScroll } from \"@vueuse/core\";\r\n ^^^^^^^^\r\nSyntaxError: The requested module '@vueuse/core' does not provide an export named 'isNumber'\r\n at async ModuleJob.run (https://viteprhpmo-pjkg.w-credentialless.staticblitz.com/blitz.c8358679.js:35:1077745)\r\n at async Promise.all (index 0)\r\n at async ESMLoader.import (https://viteprhpmo-pjkg.w-credentialless.staticblitz.com/blitz.c8358679.js:35:1312625)\r\n at async Module.build (file://file:///home/projects/vite-prhpmo/node_modules/vitepress/dist/node/serve-4d1b4005.js:41686:24)\r\n```\r\n\r\nIsNumber was removed in vueuse v10.x. what generated in `.temp/app.js` since didn't solve the different version of vueuse.\r\n\r\nAt that moment I was using yarn v1.x, and then I change to npm, after reinstall, it build success.\r\n\r\nI'm not sure it was the problem of pakage manager or vite/vitepress, or element-plus, or something else...\r\n\r\nAnd this issue #2187 may be related.\r\n\r\n### Reproduction\r\n\r\nHere is two Reproduction:\r\n\r\nwith yarn, build failed:\r\n[https://stackblitz.com/edit/vite-prhpmo?file=docs/.vitepress/config.ts\r\n](https://stackblitz.com/edit/vite-prhpmo?file=docs/.vitepress/config.ts\r\n)\r\n\r\nwith npm, build success:\r\n[https://stackblitz.com/edit/vite-wwmku1?file=docs/.vitepress/config.ts](https://stackblitz.com/edit/vite-wwmku1?file=docs/.vitepress/config.ts)\r\n\r\nwith pnpm build success too.\r\n\r\nwhat I found is that on the root of node_modules folder, yarn install vueuse@10.x while other package manager install v9.x\r\n\r\n### Expected behavior\r\n\r\nBuild success while using yarn.\r\n\r\n### System Info\r\n\r\n```shell\r\nJust see stackblitz demo.\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nyarn\r\n\r\n\r\nnpm\r\n\r\n\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.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3105],{"name":3020,"color":3021},2255,"Using Vitepress and Element Plus at the same time and building with Yarn will fail.","2023-04-26T00:04:10Z","https://github.com/vuejs/vitepress/issues/2255",0.67619485,["Reactive",3112],{},["Set"],["ShallowReactive",3115],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fcYLCKaFx5iCB3xbMc1uHwBwd6QsZ6WhH8c104GWsyME":-1},"/vuejs/vitepress/1681"]