File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
packages/@vuepress/client/src/injections Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ export const resolvePageData = async (routePath: string): Promise<PageData> => {
41
41
if ( import . meta. webpackHot || import . meta. hot ) {
42
42
// reuse vue HMR runtime
43
43
__VUE_HMR_RUNTIME__ . updatePageData = ( data : PageData ) => {
44
+ pagesData . value [ data . path ] = ( ) => Promise . resolve ( data )
44
45
if ( data . key === pageData . value . key ) {
45
46
pageData . value = data
46
47
}
Original file line number Diff line number Diff line change 1
- import { readonly , ref } from 'vue'
1
+ import { ref } from 'vue'
2
2
import type { Ref } from 'vue'
3
3
import type { PageData } from '@vuepress/shared'
4
4
import { pagesData as pagesDataRaw } from '@internal/pagesData'
5
5
6
6
export type PagesData = Record < string , ( ) => Promise < PageData > >
7
7
export type PagesDataRef = Ref < PagesData >
8
8
9
- export const pagesData : PagesDataRef = ref ( readonly ( pagesDataRaw ) as PagesData )
9
+ export const pagesData : PagesDataRef = ref ( pagesDataRaw )
10
10
11
11
export const usePagesData = ( ) : PagesDataRef => {
12
12
return pagesData
You can’t perform that action at this time.
0 commit comments