@@ -50,6 +50,10 @@ const SKIPPED_COMPONENTS: Record<string, string> = {
5050 'Translation/StatusByFile.unused.vue' : 'Unused component, might be needed in the future' ,
5151}
5252
53+ function normalizeComponentPath ( filePath : string ) : string {
54+ return filePath . replaceAll ( '\\' , '/' )
55+ }
56+
5357/**
5458 * Recursively get all Vue component files in a directory.
5559 */
@@ -63,7 +67,7 @@ function getVueFiles(dir: string, baseDir: string = dir): string[] {
6367 files . push ( ...getVueFiles ( fullPath , baseDir ) )
6468 } else if ( entry . isFile ( ) && entry . name . endsWith ( '.vue' ) ) {
6569 // Get relative path from base components directory
66- files . push ( path . relative ( baseDir , fullPath ) )
70+ files . push ( normalizeComponentPath ( path . relative ( baseDir , fullPath ) ) )
6771 }
6872 }
6973
@@ -88,7 +92,7 @@ function parseComponentsDeclaration(dtsPath: string): Map<string, string[]> {
8892 let match
8993 while ( ( match = exportRegex . exec ( content ) ) !== null ) {
9094 const componentName = match [ 1 ] !
91- const filePath = match [ 2 ] !
95+ const filePath = normalizeComponentPath ( match [ 2 ] ! )
9296
9397 const existing = componentMap . get ( componentName ) || [ ]
9498 if ( ! existing . includes ( filePath ) ) {
@@ -117,7 +121,7 @@ function getTestedComponents(
117121 let match
118122
119123 while ( ( match = directImportRegex . exec ( testFileContent ) ) !== null ) {
120- tested . add ( match [ 1 ] ! )
124+ tested . add ( normalizeComponentPath ( match [ 1 ] ! ) )
121125 }
122126
123127 // Match #components imports like:
0 commit comments