Skip to content

Commit

Permalink
fix: subpackage changes not autoreloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko committed Sep 15, 2023
1 parent 1235904 commit c34562f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions solara/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c34562f

Please sign in to comment.