\r\nimport { defineConfig } from 'vite'\r\nimport vue from '@vitejs/plugin-vue'\r\nimport vueI18n from '@intlify/vite-plugin-vue-i18n'\r\n\r\n// https://vitejs.dev/config/\r\nconst path = require(\"path\")\r\nexport default defineConfig({\r\n test: {\r\n setupFiles: ['./tests/config.ts']\r\n },\r\n optimizeDeps: {\r\n exclude: ['vue-demi']\r\n },\r\n build: {\r\n lib: {\r\n entry: path.resolve(__dirname, 'src/install.ts'),\r\n name: 'vcp',\r\n formats: ['umd'],\r\n fileName: (format) => `vcp.${format}.ts`\r\n },\r\n rollupOptions: {\r\n external: ['vue', 'vueI18n', 'vue-demi',],\r\n output: {\r\n exports: 'named',\r\n globals: {\r\n 'vue-demi': 'VueDemi',\r\n 'vue': 'Vue',\r\n }\r\n }\r\n },\r\n },\r\n plugins: [\r\n vue({\r\n style: true,\r\n css: true\r\n }),\r\n vueI18n({\r\n include: path.resolve(__dirname, 'src/assets/translations.ts'),\r\n globalSFCScope: true,\r\n compositionOnly: false,\r\n }),\r\n ],\r\n server: {\r\n port: 8080\r\n },\r\n resolve: {\r\n dedupe: ['vue'],\r\n alias: {\r\n \"~\": path.resolve(__dirname, \"./src\"),\r\n \"@\": path.resolve(__dirname, \"./src\"),\r\n },\r\n },\r\n})\r\n\r\n```\r\n\r\npackage.json:\r\n```\r\n{\r\n \"name\": \"vcp\",\r\n \"version\": \"0.9.14\",\r\n \"private\": false,\r\n \"author\": \"Alireza Safari \u003Calireza.safaree@gmail.com> (http://alireza-safari.ir)\",\r\n \"license\": \"MIT\",\r\n \"main\": \"./dist/vcp.umd.ts\",\r\n \"description\": \"Vue Client Print with Template Builder\",\r\n \"exports\": {\r\n \".\": {\r\n \"require\": \"./dist/vcp.umd.ts\"\r\n },\r\n \"./dist/style.css\": \"./dist/style.css\"\r\n },\r\n \"keywords\": [\r\n \"vcp\",\r\n \"vue print\",\r\n \"vue client print\",\r\n \"template builder\",\r\n \"vue report\",\r\n \"vue report generator\"\r\n ],\r\n \"files\": [\r\n \"dist/*\"\r\n ],\r\n \"repository\": {\r\n \"type\": \"git\",\r\n \"url\": \"https://github.com/alireza0sfr/vue-client-print\"\r\n },\r\n \"scripts\": {\r\n \"dev\": \"vite\",\r\n \"build\": \"vite build\",\r\n \"serve\": \"vite preview\",\r\n \"test\": \"vitest run --environment jsdom\",\r\n \"test:ui:\": \"vitest --environment jsdom --ui\",\r\n \"test:coverage\": \"vitest run --coverage --environment jsdom\",\r\n \"test:watch\": \"vitest --environment jsdom\"\r\n },\r\n \"dependencies\": {\r\n \"dom-to-image\": \"^2.6.0\",\r\n \"file-saver\": \"^2.0.5\",\r\n \"jsdom\": \"^19.0.0\",\r\n \"print-js\": \"^1.6.0\",\r\n \"register-service-worker\": \"^1.7.2\",\r\n \"typescript\": \"^4.7.2\",\r\n \"vitest\": \"^0.12.9\",\r\n \"vue-demi\": \"^0.12.5\",\r\n \"vue-i18n\": \"^9.1.10\"\r\n },\r\n \"peerDependencies\": {\r\n \"vue\": \">=2.0.0 || >=3.0.0\"\r\n },\r\n \"devDependencies\": {\r\n \"@intlify/vite-plugin-vue-i18n\": \"^3.4.0\",\r\n \"@vitejs/plugin-vue\": \"^2.3.3\",\r\n \"@vitest/ui\": \"^0.12.9\",\r\n \"@vue/compiler-sfc\": \"^3.2.36\",\r\n \"@vue/test-utils\": \"^2.0.0-rc.18\",\r\n \"c8\": \"^7.11.3\",\r\n \"cz-conventional-changelog\": \"^3.0.1\",\r\n \"vite\": \"^2.9.9\",\r\n \"vue\": \"^3.2.36\"\r\n }\r\n}\r\n\r\n```",[],161,"vue-demi","createElementVNode is not a function vite","2022-10-27T15:14:22Z","https://github.com/vueuse/vue-demi/issues/161",0.7479127,{"description":3026,"labels":3027,"number":3028,"owner":3009,"repository":3010,"state":3011,"title":3029,"updated_at":3030,"url":3031,"score":3032},"### Description\r\nIt would be very helpful if the VueUse playground had a versions switch feature for the `vueuse/core` package. This feature would allow users to easily switch between different versions of the `vueuse/core` package to test compatibility and behavior in different environments.\r\n\r\n### Expected Behavior\r\n- [ ] Provide a dropdown or toggle switch in the VueUse playground UI.\r\n- [ ] Allow users to select different versions of the `vueuse/core` package.\r\n- [ ] Ensure that the selected version is reflected in the playground environment.",[],27,"Feature Request: Versions Switch for vueuse/core Package","2023-12-24T09:34:58Z","https://github.com/vueuse/playground/issues/27",0.7509386,{"description":3034,"labels":3035,"number":3036,"owner":3009,"repository":3020,"state":3011,"title":3037,"updated_at":3038,"url":3039,"score":3040},"### First off \r\nThanks for all the amazing work! Super excited to be using Vue Demi. 🚀 \r\n\r\n----------------------------------\r\n\r\n### The Problem: \r\nThis is likely a user error, but I'm not able to find any examples of consuming a vue-demi plugin in a Nuxt 2 application to help point me in the right direction. \r\n\r\n**Here's what I have for my package.json in my vue-demi plugin:** \r\n```json\r\n \"peerDependencies\": {\r\n \"@vue/composition-api\": \"^1.4.5\",\r\n \"vue\": \"^2.0.0 || >=3.0.0\"\r\n },\r\n \"peerDependenciesMeta\": {\r\n \"@vue/composition-api\": {\r\n \"optional\": true\r\n }\r\n },\r\n \"dependencies\": {\r\n \"vue-demi\": \"^0.12.5\",\r\n },\r\n```\r\n\r\n```js\r\nmodule.exports = {\r\n chainWebpack: (config) => {\r\n config.externals(['@vue/composition-api', 'vue']);\r\n },\r\n};\r\n```\r\n--------------------------------\r\n\r\n**And in my consuming application:** \r\n```json\r\n\"dependencies\": {\r\n \"my-vue-demi-plugin\": \"1.0.0\",\r\n \"nuxt\": \"^2.15.2\",\r\n}\r\n```\r\n\r\n--------------------------------\r\n\r\nI'm getting the following error: \r\n\u003Cimg width=\"497\" alt=\"Screen Shot 2022-04-25 at 7 18 40 PM\" src=\"https://user-images.githubusercontent.com/2212763/165194784-1eb33040-08e7-467c-984f-ed369a03a61c.png\">\r\n\r\n--------------------------------\r\n\r\nUpon further inspection, I see that there's a `default` nested inside of external vue reference, which it seems that the install function isn't expecting. \r\n\r\n\u003Cimg width=\"862\" alt=\"Screen Shot 2022-04-25 at 7 11 52 PM\" src=\"https://user-images.githubusercontent.com/2212763/165194971-acef8f9e-5477-4207-8b5d-a71b60c2a502.png\">\r\n\u003Cimg width=\"966\" alt=\"Screen Shot 2022-04-25 at 7 20 01 PM\" src=\"https://user-images.githubusercontent.com/2212763/165194974-f535ed70-3560-412c-a2e8-8ac25b77b9da.png\">\r\n\r\n\r\nWhat am I missing here? 🤷 🤔 \r\n\r\n",[],155,"Nuxt 2 having issues with the lib_install function ","2022-04-27T14:10:36Z","https://github.com/vueuse/vue-demi/issues/155",0.7509498,{"description":3042,"labels":3043,"number":3044,"owner":3009,"repository":3020,"state":3011,"title":3045,"updated_at":3046,"url":3047,"score":3048},"【description】:\r\nI want to try create the same component for Vue2 & Vue3 in the same source code, so I find vue-demi. But.. I have seen some projects likes [json-editor-vue](https://github.com/cloydlau/json-editor-vue). For compact Vue2 & Vue3, I found its source code write `render` options for 2 & 3. But i think it's hard for developer to code.\r\n\r\n I prefer to code in `template` in a sfc file. So i have some idea(We can smooth the difference with `Vue2` & `Vue3` when we compile components). Can we write a component with `setup` & `composition-api` in a `sfc`. And then when we compile the component, we can use a series of plugins for `Vue2`: `unplugin-auto-import`, `unplugin-vue2-script-setup`, `vite-plugin-vue2`, `vue-template-compiler@2.6.x`, and plugins for `Vue3`: `@vitejs/plugin-vue`. \r\n\r\n@antfu Maybe u have thought some idea before create this repo. So can u give me some advice or info?",[],153,"it's hard for developer to write a common component with vue-demi ","2023-01-30T23:22:27Z","https://github.com/vueuse/vue-demi/issues/153",0.7524887,{"description":3050,"labels":3051,"number":3052,"owner":3009,"repository":3020,"state":3011,"title":3053,"updated_at":3054,"url":3055,"score":3056},"First of all, I saw a couple of issues that involved more or less the same issue, but I tought it would be useful to group everything into one issue, so we could hopefully try to solve it.\r\n\r\n### Related issues:\r\n\r\n- #145 \r\n- #136 \r\n- #117 \r\n- #129 \r\n\r\n### Problem\r\n\r\nI'm currently building a private reusable package for a real-world application. This application runs on `nuxt2` (currently `nuxt-bridge`), and we're planning to migrate to `nuxt3` when all the packages we need are there. The idea was to build that reusable package in `vue3`, and use `vue-demi` to make it possible to be used in our `nuxt-bridge` app.\r\n\r\nAt first I just tried building the library and use it in a separate vue 3 app. With Vite it was really fast & easy to make it work 🎉\r\n\r\nHowever when I tried importing it in our `nuxt-bridge` app I came across several issues:\r\n\r\n1) When externalising `vue` dependency in vite, I got a list of warnings that some functions are not exported by vue. This is what the most issues are about.\r\n\r\n2) When I don't externalise `vue` in `vite.config.js`, I just get an empty component. In my repro I don't get any warning. I just see an anonymous component in my dev tools. In my production nuxt-app, I see the following error: `no template or render function is defined`. The component seemed to be imported correctly, it just doesn't render any HTML.\r\n\r\n3) I saw in other issues that the solution might be to externalise `vue-demi` as well, but that doesn't seem to make any difference for this.\r\n\r\n4) also tried using `npx vue-demi-fix` && `npx vue-demi-switch 2` commands, but these also doesn't seem to be changing a whole lot.\r\n\r\nI also saw that in #117 , [@koooge](https://github.com/koooge) researched into the issue a bit and saw that it might be due to a breaking change in @vue/core.\r\n\r\nThat's when I decided to build a repro with a vue2 app (@vue/cli), vue3 app (vite) and a simple component in a separate lib.\r\n\r\n### Repro\r\n\r\nhttps://github.com/jclaessens97/vue-demi-vue2-broken-repro\r\n\r\n\r\nI hope we can look into this issue and try to come up with a solution to be able to make vue3 components compatible for vue2, until everything is vue3 ready.\r\n",[],152,"Vue3 lib not working in Vue2 projects","2022-10-14T07:02:51Z","https://github.com/vueuse/vue-demi/issues/152",0.75637347,{"description":3058,"labels":3059,"number":1461,"owner":3009,"repository":3010,"state":3060,"title":3061,"updated_at":3062,"url":3063,"score":3064},"Hi @wheatjs! Thanks for creating such beautiful vueuse playground! It made getting started and learning Vue and Vueuse exponentially easier for me!\r\n\r\nWould you kindly consider adding a license file for this? I wanted to build upon this project for making a front-end for my custom disassembler and assembler project.",[],"closed","Request to add a LICENSE file","2023-09-23T01:28:03Z","https://github.com/vueuse/playground/issues/25",0.70160204,{"description":3066,"labels":3067,"number":33,"owner":3009,"repository":3010,"state":3060,"title":3068,"updated_at":3069,"url":3070,"score":3071},"Is there any reason not use the original Vue SFC Playground [https://sfc.vuejs.org/#](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IHVzZU1vdXNlIH0gZnJvbSAnQHZ1ZXVzZS9jb3JlJ1xuaW1wb3J0IENvb3JkaW5hdGUgZnJvbSAnLi9Db29yZGluYXRlLnZ1ZSdcblxuY29uc3QgeyB4LCB5IH0gPSB1c2VNb3VzZSgpXG48L3NjcmlwdD5cblxuPHRlbXBsYXRlPlxuPGRpdlxuICBncmlkPVwifiBmbG93LWNvbCBnYXAtNFwiXG4gIHBsYWNlPVwiY29udGVudC1jZW50ZXIgaXRlbXMtY2VudGVyXCJcbiAgaD1cInNjcmVlblwiXG4gIGZvbnQ9XCJtb25vXCJcbiAgPlxuICA8Q29vcmRpbmF0ZSBsYWJlbD1cIlhcIiA6dmFsdWU9XCJ4XCIgLz5cbiAgPENvb3JkaW5hdGUgbGFiZWw9XCJZXCIgOnZhbHVlPVwieVwiIC8+XG48L2Rpdj5cbjwvdGVtcGxhdGU+IiwiaW1wb3J0LW1hcC5qc29uIjoie1xuICBcImltcG9ydHNcIjoge1xuICAgIFwidnVlXCI6IFwiaHR0cHM6Ly9zZmMudnVlanMub3JnL3Z1ZS5ydW50aW1lLmVzbS1icm93c2VyLmpzXCIsXG4gICAgXCJAdnVldXNlL2NvcmVcIjogXCJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL0B2dWV1c2UvY29yZS9pbmRleC5tanNcIixcbiAgICBcIkB2dWV1c2Uvc2hhcmVkXCI6IFwiaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS9AdnVldXNlL3NoYXJlZC9pbmRleC5tanNcIixcbiAgICBcInZ1ZS1kZW1pXCI6IFwiaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS92dWUtZGVtaS9saWIvaW5kZXgubWpzXCJcbiAgfVxufSIsIkNvb3JkaW5hdGUudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IGRlZmluZVByb3BzIH0gZnJvbSAndnVlJ1xuXG5kZWZpbmVQcm9wcyh7XG4gIGxhYmVsOiBTdHJpbmcsXG4gIHZhbHVlOiBOdW1iZXIsXG59KVxuPC9zY3JpcHQ+XG5cbjx0ZW1wbGF0ZT5cbjxkaXZcbiAgZm9udD1cIm1vbm9cIlxuICBiZz1cImxpZ2h0LTUwMCBkYXJrOmRhcmstNTAwXCJcbiAgZmxleD1cIn4gY29sXCJcbiAgdGV4dD1cImNlbnRlclwiXG4gIHA9XCIyXCJcbiAgYm9yZGVyPVwicm91bmRlZFwiXG4+XG4gIDxzcGFuIHRleHQ9XCI0eGxcIj57eyB2YWx1ZSB9fTwvc3Bhbj5cbiAgPHNwYW4gdGV4dD1cInNtIGRhcms6bGlnaHQtOTAwIGRhcms6b3BhY2l0eS01MFwiIG09XCJ0LTJcIj5Nb3VzZSB7eyBsYWJlbCB9fTwvc3Bhbj5cbjwvZGl2PlxuPC90ZW1wbGF0ZT4ifQ==) with `@vueuse/core`, `@vueuse/shared` and `vue-demi` added to the `import-map.json`? It seems to work just fine.",[],"Any issues with using the original Vue SFC Playground?","2022-07-28T23:07:44Z","https://github.com/vueuse/playground/issues/10",0.7104965,{"description":3073,"labels":3074,"number":3075,"owner":3009,"repository":3009,"state":3060,"title":3076,"updated_at":3077,"url":3078,"score":3079},"### Describe the bug\n\nHello, I tried to use the playground folder from the repo to try functions in a blank setup but for some reason reactivity don't seems to work.\r\nIt's look that the \"reactivity tree\" stop at the page render.\r\nI also tried to install vitesse in a new folder, but I get the same result.\r\nFor example if I load the useMouse I get value 0,0 but if I type something in the input field the x,y values get updated.\r\n\r\nI have no idea what is happening here\n\n### Reproduction\n\nhttps://github.com/Zehir/vueuse/tree/dev\n\n### System Info\n\n```Shell\nSystem:\r\n OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)\r\n CPU: (4) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz\r\n Memory: 4.31 GB / 7.77 GB\r\n Container: Yes\r\n Shell: 5.1.4 - /bin/bash\r\n Binaries:\r\n Node: 16.17.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 8.15.0 - /usr/local/bin/npm\r\n npmPackages:\r\n vue: ^3.2.39 => 3.2.39\n```\n\n\n### Used Package Manager\n\npnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],2268,"Repo playground not working","2022-12-16T09:55:20Z","https://github.com/vueuse/vueuse/issues/2268",0.73387325,{"description":3081,"labels":3082,"number":3083,"owner":3009,"repository":3009,"state":3060,"title":3084,"updated_at":3085,"url":3086,"score":3087},"### Describe the bug\n\n在线的playground,似乎只能解析demo.vue,而不能解析相对路径的vue文件,导致demo跑不出来。\n\n\u003Cimg width=\"1920\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3395b488-ddfe-4b0c-b38e-ad2c3f9dd613\" />\n\n### Reproduction\n\nhttps://playground.vueuse.org/?vueuse=13.3.0#eNq9VW1v0zAQ/itHvrST6qajmzRV6cRA+wCIgRjwKdIUEif1ltiRX7JWVf87Zydtk2wrBSHyobXvzc9zvjuvvauyHFeGejMvULFkpQZFtSkhj3g2Dz2tQu8y5KwohdSwBqPopyhj8Ue6UrCBVIoCBm8wACr8WEg6aBnHoiiNpsnOEO32egzRiMc+ri0KVIY8FlxZb7VgqR5BNQIzAjoChes7c4crc6fsX2ykpFxj9HkH1/BkG+TBopzvcAyHJzC/hCspo9XYHj1sQpygR+DX/JEtbjQtyjzSFHcAQcIqiPNIKcxImtMl2B8SixyKZObWUjy6RAF+ASuyegWgZIw+PnIbqyoLva18G21BphdQrsgFFCQyWoCWEVepkEW9YpoJDomRkV2Q88lkH2O2DbKGgSijmOkVmQxm8KpJ00AKjRTI6YWVunTCZuvuaDq0SK4BjhsuNN2B03SpSYz5oRIKTSZQ/CTnO5r2+yKpUqAXFFKR5+KR8axOumVC8QaE0bvYvg2+P+pJUrOoJFO4N0qzdNWc2zktsCUzq6LcUPSpOjqAHy1DW1AvOpqeoznWkfYc6QHHNrtiSU5DD/yjEX0/FlHdnXtH9c+pBH5dH392bbZcpgfuzhVjD8Ktkx2J35V4vwDMoQvpJtxOkH7S1d8lodclZ13aN7bm3bR0vUKTwHeiF0rFZRSjvO4nVGGDU4KFBAXjZEFOx+e06DEIYpG0ONivIjhLMC42JTDuenM/QJoxgsLaoq/ZgRJck0Jw0TXonA2wXtvwsNl0IOGjkHTYNql8uusm+ZkhmkYVw7n+Hwdp89D8bpDusQd+6+HwRvh8IuCUZeN7JTi+sWtrHHr2QWI5lZ9LCwZvZAZOY3WRnaMfnExLQ0dbebyg8cMz8nu1tLLQs/VFZYVlvdPpSGYU+8yqr29vsFBbykIkJkfrA8qvVIncWIy12VvDE4TdsnNo37sHHWf/N3W91BST3ZCyQK3lxtlj1xr67gD1Pdzp+Mz5hXzjbX4BkdmOiQ==\n\n### System Info\n\n```Shell\nChrome Version 137.0.7151.69\n```\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [x] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [x] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [x] Read the [docs](https://vueuse.org/guide).\n- [x] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [x] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],4831,"BUG | `playground` | 在线代码无法解析","2025-06-23T09:10:07Z","https://github.com/vueuse/vueuse/issues/4831",0.7379147,["Reactive",3089],{},["Set"],["ShallowReactive",3092],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$ft-LMrbydMmbpPTbfBq7nqwRsEWkkloP_7u1v3mTXBW0":-1},"/vueuse/playground/9"]