From 51604fcfdba6fdcc84302b8bdbc9a21a6b6f6a76 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 13 Feb 2025 17:37:10 -0800 Subject: [PATCH] only write if file changed --- reflex/compiler/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reflex/compiler/utils.py b/reflex/compiler/utils.py index 91ee18b86..2e723c540 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.read_text(encoding="utf-8") == code: + return path.write_text(code, encoding="utf-8")