From 2f9e25ddf6399679c338636cc7dbb25904dbadbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Thu, 25 Jan 2024 16:49:34 +0800 Subject: [PATCH] feat(playground): todo mvc --- playground/package.json | 1 + playground/src/todo-mvc.vue | 84 +++++++++++++++++++++++++++++-------- playground/vite.config.ts | 6 +++ pnpm-lock.yaml | 47 +++++++++++++++++++++ 4 files changed, 121 insertions(+), 17 deletions(-) diff --git a/playground/package.json b/playground/package.json index b6758d096..15545037d 100644 --- a/playground/package.json +++ b/playground/package.json @@ -7,6 +7,7 @@ "build": "node ./setup/vite.js build" }, "dependencies": { + "@vueuse/core": "^10.7.2", "vue": "workspace:*" }, "devDependencies": { diff --git a/playground/src/todo-mvc.vue b/playground/src/todo-mvc.vue index 75fcf27b8..4de671f3e 100644 --- a/playground/src/todo-mvc.vue +++ b/playground/src/todo-mvc.vue @@ -1,12 +1,17 @@ + + diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 7e6ebb543..f10e5ee40 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -6,6 +6,9 @@ import * as CompilerVapor from '@vue/compiler-vapor' import * as CompilerSFC from '@vue/compiler-sfc' export default defineConfig({ + resolve: { + alias: [{ find: /^vue$/, replacement: 'vue/vapor' }], + }, build: { target: 'esnext', }, @@ -20,4 +23,7 @@ export default defineConfig({ DevPlugin(), Inspect(), ], + optimizeDeps: { + exclude: ['@vueuse/core'], + }, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c7b9fdd9f..32d4f53a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -454,6 +454,9 @@ importers: playground: dependencies: + '@vueuse/core': + specifier: ^10.7.2 + version: 10.7.2(vue@packages+vue) vue: specifier: workspace:* version: link:../packages/vue @@ -1346,6 +1349,10 @@ packages: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true + /@types/web-bluetooth@0.0.20: + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + dev: false + /@types/yauzl@2.10.2: resolution: {integrity: sha512-Km7XAtUIduROw7QPgvcft0lIupeG8a8rdKL8RiSyKvlE7dYY31fEn41HVuQsRFDuROA8tA4K2UVL+WdfFmErBA==} requiresBuild: true @@ -1641,6 +1648,31 @@ packages: resolution: {integrity: sha512-BK9D7AgpYAWVrtd7Kkc3CotU/ox8l+mPjsLgK16ZP+Ldj8jXPrJtzYQ2rTQNRJOxVSVx5acftDTLDLENFhQdDw==} dev: false + /@vueuse/core@10.7.2(vue@packages+vue): + resolution: {integrity: sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==} + dependencies: + '@types/web-bluetooth': 0.0.20 + '@vueuse/metadata': 10.7.2 + '@vueuse/shared': 10.7.2(vue@packages+vue) + vue-demi: 0.14.6(vue@packages+vue) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: false + + /@vueuse/metadata@10.7.2: + resolution: {integrity: sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==} + dev: false + + /@vueuse/shared@10.7.2(vue@packages+vue): + resolution: {integrity: sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==} + dependencies: + vue-demi: 0.14.6(vue@packages+vue) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: false + /@zeit/schemas@2.29.0: resolution: {integrity: sha512-g5QiLIfbg3pLuYUJPlisNKY+epQJTcMDsOnVNkscrDP1oi7vmJnzOANYJI/1pZcVJ6umUkBv3aFtlg1UvUHGzA==} dev: true @@ -6284,6 +6316,21 @@ packages: engines: {node: '>=0.10.0'} dev: true + /vue-demi@0.14.6(vue@packages+vue): + resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: link:packages/vue + dev: false + /w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'}