File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { ComponentMeta } from 'vue-component-meta'
3
3
import { refineMeta } from "./utils"
4
4
import { join } from "pathe"
5
5
import { existsSync , readFileSync , writeFileSync , mkdirSync } from 'fs'
6
+ import { withBase } from "ufo"
6
7
7
8
export interface Options {
8
9
rootDir : string
@@ -18,7 +19,7 @@ export function getComponentMeta(component: string, options?: Options): Componen
18
19
cacheDir : join ( rootDir , ".data/cache" ) ,
19
20
...options
20
21
}
21
- const fullPath = join ( opts . rootDir , component )
22
+ const fullPath = withBase ( component , opts . rootDir )
22
23
const cachePath = join ( opts . cacheDir , `${ component } .json` )
23
24
24
25
if ( opts . cache && existsSync ( cachePath ) ) {
@@ -35,7 +36,7 @@ export function getComponentMeta(component: string, options?: Options): Componen
35
36
} ,
36
37
)
37
38
38
- const meta = checker . getComponentMeta ( component )
39
+ const meta = checker . getComponentMeta ( fullPath )
39
40
const refinedMeta = refineMeta ( meta )
40
41
41
42
if ( opts . cache ) {
You can’t perform that action at this time.
0 commit comments