diff --git a/src/NativeServiceProvider.php b/src/NativeServiceProvider.php index 0f88a68..19deb2a 100644 --- a/src/NativeServiceProvider.php +++ b/src/NativeServiceProvider.php @@ -386,8 +386,9 @@ protected function registerNativeComponents(): void continue; } - // Get relative path from Components directory - $relativePath = str_replace($componentPath.'/', '', $file->getPathname()); + // Get relative path from Components directory (normalize separators for Windows compatibility) + $normalizedBase = str_replace('\\', '/', $componentPath).'/'; + $relativePath = substr(str_replace('\\', '/', $file->getPathname()), strlen($normalizedBase)); // Remove .php extension $classPath = substr($relativePath, 0, -4);