diff --git a/reasonify-headless/load.py b/reasonify-headless/load.py index 13eeb52..3b7d741 100644 --- a/reasonify-headless/load.py +++ b/reasonify-headless/load.py @@ -15,5 +15,7 @@ if __debug__: for module in tuple(sys.modules): # for HMR - if module.startswith("reasonify") or module.startswith("promplate_recipes"): - del sys.modules[module] + for prefix in ("reasonify", "promplate_recipes", "api", "utils", "bridge"): + if module.startswith(prefix): + del sys.modules[module] + break