diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py index 88bd61090ca..bbb1e56e358 100644 --- a/reflex/compiler/compiler.py +++ b/reflex/compiler/compiler.py @@ -621,7 +621,10 @@ def purge_web_pages_dir(): return # Empty out the web pages directory. - utils.empty_dir(get_web_dir() / constants.Dirs.PAGES, keep_files=["routes.js"]) + utils.empty_dir( + get_web_dir() / constants.Dirs.PAGES, + keep_files=["routes.js", "entry.client.js"], + ) if TYPE_CHECKING: