@@ -332,16 +332,17 @@ protected function compileViewsFromPath(string $path, ?string $namespace): void
332332 continue ;
333333 }
334334
335- // Skip if already processed (e.g., via explicit map or overlapping path)
336- if (isset ( $ this -> processedPaths [ $ absolutePath ]) ) {
337- $ this ->line (" - Already compiled [ {$ canonicalName } ], skipping... ( { $ count } / { $ total } ) " );
335+ $ canonicalName = $ this -> generateCanonicalName ( $ realBasePath , $ absolutePath , $ namespace );
336+ if (! $ canonicalName ) {
337+ $ this ->warn (" - Could not determine canonical name for [ {$ absolutePath } ] relative to base [ { $ realBasePath } ]. " );
338338
339339 continue ;
340340 }
341341
342- $ canonicalName = $ this ->generateCanonicalName ($ realBasePath , $ absolutePath , $ namespace );
343- if (!$ canonicalName ) {
344- $ this ->warn (" - Could not determine canonical name for [ {$ absolutePath }] relative to base [ {$ realBasePath }]. " );
342+ // Skip if already processed (e.g., via explicit map or overlapping path)
343+ if (isset ($ this ->processedPaths [$ absolutePath ])) {
344+ $ this ->line (" - Already compiled [ {$ canonicalName }], skipping... ( {$ count }/ {$ total }) " );
345+ $ this ->manifestData ['views ' ][$ canonicalName ] = $ this ->processedPaths [$ absolutePath ];
345346
346347 continue ;
347348 }
@@ -351,7 +352,7 @@ protected function compileViewsFromPath(string $path, ?string $namespace): void
351352 if (!empty ($ hashedFilename )) {
352353 // Only add to 'views' part, 'map' is only for explicitly mapped View::file() targets
353354 $ this ->manifestData ['views ' ][$ canonicalName ] = $ hashedFilename ;
354- $ this ->processedPaths [$ absolutePath ] = true ;
355+ $ this ->processedPaths [$ absolutePath ] = $ hashedFilename ;
355356 $ this ->line (" - Compiled [ {$ canonicalName }] ( {$ count }/ {$ total }) " );
356357 } else {
357358 $ this ->warn (" - Compilation returned empty (but no error) for [ {$ canonicalName }] ( {$ count }/ {$ total }) " );
0 commit comments