diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index c76541151d7..d140b57242d 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -405,7 +405,10 @@ def get_reload_paths() -> Sequence[Path]: module_path = module_path.parent while module_path.parent.name and _has_child_file(module_path, "__init__.py"): - if _has_child_file(module_path, "rxconfig.py"): + if ( + _has_child_file(module_path, "rxconfig.py") + and module_path == Path.cwd() + ): init_file = module_path / "__init__.py" init_file_content = init_file.read_text() if init_file_content.strip():