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 {
118118 fs ?: { 
119119 fileExists ( file : string ) : boolean 
120120 readFile ( file : string ) : string  |  undefined 
121+  realpath ?( file : string ) : string 
121122 } 
122123 /** 
123124 * 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 {
860860 } 
861861 return  fs . readFile ( file ) 
862862 } , 
863+  realpath : fs . realpath , 
863864 } ) 
864865} 
865866
@@ -1048,7 +1049,7 @@ function resolveWithTS(
10481049 if  ( filename . endsWith ( '.vue.ts' ) )  { 
10491050 filename  =  filename . replace ( / \. t s $ / ,  '' ) 
10501051 } 
1051-  return  filename 
1052+  return  fs . realpath  ?  fs . realpath ( filename )  :  filename 
10521053 } 
10531054} 
10541055
                         You can’t perform that action at this time. 
           
                  
0 commit comments