diff --git a/solara/server/app.py b/solara/server/app.py index d0a43c7d9..7edc5231b 100644 --- a/solara/server/app.py +++ b/solara/server/app.py @@ -79,6 +79,11 @@ def __init__(self, name, default_app_name="Page"): self._first_execute_app = app reload.reloader.root_path = self.directory + if self.type == AppType.MODULE: + package_name = self.name.split(".")[0] + mod = importlib.import_module(package_name) + package_root_path = Path(mod.__file__).parent + reload.reloader.root_path = package_root_path app_context.close() def _execute(self):