File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
packages/compiler-sfc/src Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ export interface SFCScriptCompileOptions {
118
118
fs ?: {
119
119
fileExists ( file : string ) : boolean
120
120
readFile ( file : string ) : string | undefined
121
+ realpath ?( file : string ) : string
121
122
}
122
123
/**
123
124
* Transform Vue SFCs into custom elements.
Original file line number Diff line number Diff line change @@ -860,6 +860,7 @@ function resolveFS(ctx: TypeResolveContext): FS | undefined {
860
860
}
861
861
return fs . readFile ( file )
862
862
} ,
863
+ realpath : fs . realpath ,
863
864
} )
864
865
}
865
866
@@ -1048,7 +1049,7 @@ function resolveWithTS(
1048
1049
if ( filename . endsWith ( '.vue.ts' ) ) {
1049
1050
filename = filename . replace ( / \. t s $ / , '' )
1050
1051
}
1051
- return filename
1052
+ return fs . realpath ? fs . realpath ( filename ) : filename
1052
1053
}
1053
1054
}
1054
1055
You can’t perform that action at this time.
0 commit comments