Skip to content

Commit b352c09

Browse files
committed
fix(client): remove usage of vueuse (close #1500)
1 parent 593fb4a commit b352c09

File tree

4 files changed

+3
-54
lines changed

4 files changed

+3
-54
lines changed

packages/client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"dependencies": {
4040
"@vue/devtools-api": "^6.6.1",
4141
"@vuepress/shared": "workspace:*",
42-
"@vueuse/core": "^10.7.2",
4342
"vue": "^3.4.19",
4443
"vue-router": "^4.2.5"
4544
},

packages/client/src/router/createVueRouter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export const createVueRouter = (): Router => {
5353
// attach page chunk route meta
5454
_pageChunk: pageChunk,
5555
}
56+
} else if (to.path === from.path) {
57+
to.meta = from.meta
5658
}
5759
})
5860

packages/client/src/setupGlobalComputed.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { computedWithControl } from '@vueuse/core'
21
import type { App } from 'vue'
32
import { computed } from 'vue'
43
import type { Router } from 'vue-router'
@@ -32,10 +31,7 @@ export const setupGlobalComputed = (
3231
const routePath = computed(() => router.currentRoute.value.path)
3332

3433
// load page chunk from route meta
35-
const pageChunk = computedWithControl(
36-
routePath,
37-
() => router.currentRoute.value.meta._pageChunk!,
38-
)
34+
const pageChunk = computed(() => router.currentRoute.value.meta._pageChunk!)
3935

4036
// handle page data HMR
4137
if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) {
@@ -48,7 +44,6 @@ export const setupGlobalComputed = (
4844
router.currentRoute.value.meta._pageChunk?.data.path
4945
) {
5046
router.currentRoute.value.meta._pageChunk.data = newPageData
51-
pageChunk.trigger()
5247
}
5348
}
5449
}

pnpm-lock.yaml

Lines changed: 0 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)