@vuepress/client
Advanced tools
Comparing version 2.0.0-beta.60 to 2.0.0-beta.61
@@ -20,3 +20,3 @@ import { | ||
withBase | ||
} from "./chunk-E44UNXTX.js"; | ||
} from "./chunk-X6BS2PXP.js"; | ||
@@ -81,2 +81,3 @@ // src/app.ts | ||
const router = createRouter({ | ||
// it might be an issue of vue-router that have to remove the ending slash | ||
history: historyCreator(removeEndingSlash(__VUEPRESS_BASE__)), | ||
@@ -111,10 +112,12 @@ routes: createRoutes(), | ||
// src/setupGlobalComputed.ts | ||
import { computed } from "vue"; | ||
import { computed, ref, watch } from "vue"; | ||
var setupGlobalComputed = (app, router, clientConfigs2) => { | ||
const routePath = ref(router.currentRoute.value.path); | ||
watch( | ||
() => router.currentRoute.value.path, | ||
(value) => routePath.value = value | ||
); | ||
const layouts = computed(() => resolvers.resolveLayouts(clientConfigs2)); | ||
const routeLocale = computed( | ||
() => resolvers.resolveRouteLocale( | ||
siteData.value.locales, | ||
router.currentRoute.value.path | ||
) | ||
() => resolvers.resolveRouteLocale(siteData.value.locales, routePath.value) | ||
); | ||
@@ -176,6 +179,4 @@ const siteLocaleData = computed( | ||
import { isPlainObject, isString } from "@vuepress/shared"; | ||
import { onMounted, provide, ref, useSSRContext, watch } from "vue"; | ||
import { useRoute } from "vue-router"; | ||
import { onMounted, provide, ref as ref2, useSSRContext, watch as watch2 } from "vue"; | ||
var setupUpdateHead = () => { | ||
const route = useRoute(); | ||
const head = usePageHead(); | ||
@@ -191,3 +192,3 @@ const lang = usePageLang(); | ||
} | ||
const headTags = ref([]); | ||
const headTags = ref2([]); | ||
const loadHead = () => { | ||
@@ -221,4 +222,4 @@ head.value.forEach((item) => { | ||
updateHead(); | ||
watch( | ||
() => __VUEPRESS_DEV__ ? head.value : route.path, | ||
watch2( | ||
() => head.value, | ||
() => updateHead() | ||
@@ -293,3 +294,3 @@ ); | ||
if (__VUEPRESS_DEV__ || __VUE_PROD_DEVTOOLS__) { | ||
const { setupDevtools } = await import("./setupDevtools-EXVHPMXB.js"); | ||
const { setupDevtools } = await import("./setupDevtools-X4YFRK4B.js"); | ||
setupDevtools(app, globalComputed); | ||
@@ -296,0 +297,0 @@ } |
@@ -32,3 +32,3 @@ import { | ||
withBase | ||
} from "./chunk-E44UNXTX.js"; | ||
} from "./chunk-X6BS2PXP.js"; | ||
export { | ||
@@ -35,0 +35,0 @@ ClientOnly, |
{ | ||
"name": "@vuepress/client", | ||
"version": "2.0.0-beta.60", | ||
"version": "2.0.0-beta.61", | ||
"description": "Client package of VuePress", | ||
@@ -36,6 +36,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@vue/devtools-api": "^6.4.5", | ||
"vue": "^3.2.45", | ||
"@vue/devtools-api": "^6.5.0", | ||
"vue": "^3.2.47", | ||
"vue-router": "^4.1.6", | ||
"@vuepress/shared": "2.0.0-beta.60" | ||
"@vuepress/shared": "2.0.0-beta.61" | ||
}, | ||
@@ -42,0 +42,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33828
11
1111
+ Added@mdit-vue/types@0.12.0(transitive)
+ Added@vuepress/shared@2.0.0-beta.61(transitive)
- Removed@mdit-vue/types@0.11.0(transitive)
- Removed@vuepress/shared@2.0.0-beta.60(transitive)
Updated@vue/devtools-api@^6.5.0
Updatedvue@^3.2.47