@@ -292,6 +292,11 @@ export default defineNuxtModule<ModuleOptions>({
292292
293293            const  fullPath  =  path . posix . normalize ( `${ parentPath } ${ page . path }  )  // Объединяем путь родителя и текущий путь 
294294
295+             // Skip internal paths 
296+             if  ( isInternalPath ( fullPath ) )  { 
297+               return 
298+             } 
299+ 
295300            // Проверяем наличие динамического сегмента :locale 
296301            const  localeSegmentMatch  =  fullPath . match ( / : l o c a l e \( ( [ ^ ) ] + ) \) / ) 
297302
@@ -308,13 +313,17 @@ export default defineNuxtModule<ModuleOptions>({
308313                  localizedPath  =  localizedPath . replace ( / : l o c a l e \( [ ^ ) ] + \) / ,  localeCode ) 
309314
310315                  // Добавляем локализованный путь в массив 
311-                   prerenderRoutes . push ( localizedPath ) 
316+                   if  ( ! isInternalPath ( localizedPath ) )  { 
317+                     prerenderRoutes . push ( localizedPath ) 
318+                   } 
312319                } 
313320              } ) 
314321            } 
315322            else  { 
316323              // Если в пути нет динамического сегмента локали, то просто добавляем его в массив 
317-               prerenderRoutes . push ( fullPath ) 
324+               if  ( ! isInternalPath ( fullPath ) )  { 
325+                 prerenderRoutes . push ( fullPath ) 
326+               } 
318327            } 
319328
320329            // Рекурсивно обрабатываем детей, если они есть 
@@ -469,6 +478,16 @@ export default defineNuxtModule<ModuleOptions>({
469478        return 
470479      } 
471480      const  routesSet  =  prerenderRoutes . routes 
481+ 
482+       // Remove internal paths before localization processing 
483+       const  routesToRemove : string [ ]  =  [ ] 
484+       routesSet . forEach ( ( route )  =>  { 
485+         if  ( isInternalPath ( route ) )  { 
486+           routesToRemove . push ( route ) 
487+         } 
488+       } ) 
489+       routesToRemove . forEach ( route  =>  routesSet . delete ( route ) ) 
490+       
472491      const  additionalRoutes  =  new  Set < string > ( ) 
473492      // Проходим по каждому существующему маршруту и добавляем локализованные версии 
474493      routesSet . forEach ( ( route )  =>  { 
0 commit comments