diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 91ee18b865..c66dfe3043 100644 --- a/reflex/compiler/utils.py +++ b/reflex/compiler/utils.py @@ -523,6 +523,8 @@ def write_page(path: str | Path, code: str): """ path = Path(path) path_ops.mkdir(path.parent) + if path.exists() and path.read_text(encoding="utf-8") == code: + return path.write_text(code, encoding="utf-8")