@vuepress/client
Advanced tools
Comparing version 2.0.0-beta.63 to 2.0.0-beta.64
@@ -60,4 +60,17 @@ import { | ||
}, | ||
{ | ||
path: path.endsWith("/") ? ( | ||
// redirect from `/index.html` to `/` | ||
path + "index.html" | ||
) : ( | ||
// redirect from `/foo` to `/foo.html` | ||
path.substring(0, path.length - 5) | ||
), | ||
redirect: path | ||
}, | ||
...redirects.map((item) => ({ | ||
path: item, | ||
path: item === ":md" ? ( | ||
// redirect from `/foo.md` to `/foo.html` | ||
path.substring(0, path.length - 5) + ".md" | ||
) : item, | ||
redirect: path | ||
@@ -111,11 +124,8 @@ })) | ||
// src/setupGlobalComputed.ts | ||
import { computed, ref, watch } from "vue"; | ||
import { computedEager } from "@vueuse/core"; | ||
import { computed } 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( | ||
const routePath = computedEager(() => router.currentRoute.value.path); | ||
const routeLocale = computedEager( | ||
() => resolvers.resolveRouteLocale(siteData.value.locales, routePath.value) | ||
@@ -178,3 +188,3 @@ ); | ||
import { isPlainObject, isString } from "@vuepress/shared"; | ||
import { onMounted, provide, ref as ref2, useSSRContext, watch as watch2 } from "vue"; | ||
import { onMounted, provide, ref, useSSRContext, watch } from "vue"; | ||
var setupUpdateHead = () => { | ||
@@ -191,3 +201,3 @@ const head = usePageHead(); | ||
} | ||
const headTags = ref2([]); | ||
const headTags = ref([]); | ||
const loadHead = () => { | ||
@@ -221,6 +231,3 @@ head.value.forEach((item) => { | ||
updateHead(); | ||
watch2( | ||
() => head.value, | ||
() => updateHead() | ||
); | ||
watch(() => head.value, updateHead); | ||
}); | ||
@@ -227,0 +234,0 @@ }; |
@@ -207,3 +207,3 @@ import { PageData, PageFrontmatter, HeadConfig, SiteData } from '@vuepress/shared'; | ||
*/ | ||
type RouteLocaleRef = ComputedRef<RouteLocale>; | ||
type RouteLocaleRef = Readonly<Ref<RouteLocale>>; | ||
/** | ||
@@ -210,0 +210,0 @@ * Injection key for page route locale path |
{ | ||
"name": "@vuepress/client", | ||
"version": "2.0.0-beta.63", | ||
"version": "2.0.0-beta.64", | ||
"description": "Client package of VuePress", | ||
@@ -37,5 +37,6 @@ "keywords": [ | ||
"@vue/devtools-api": "^6.5.0", | ||
"@vueuse/core": "^10.2.1", | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.2.2", | ||
"@vuepress/shared": "2.0.0-beta.63" | ||
"@vuepress/shared": "2.0.0-beta.64" | ||
}, | ||
@@ -42,0 +43,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
34145
1118
5
+ Added@vueuse/core@^10.2.1
+ Added@types/web-bluetooth@0.0.20(transitive)
+ Added@vuepress/shared@2.0.0-beta.64(transitive)
+ Added@vueuse/core@10.11.1(transitive)
+ Added@vueuse/metadata@10.11.1(transitive)
+ Added@vueuse/shared@10.11.1(transitive)
+ Addedvue-demi@0.14.10(transitive)
- Removed@vuepress/shared@2.0.0-beta.63(transitive)