瀏覽代碼

compiler: preserve `app/routes.js` when purging

this file only gets copied during `reflex init`, so don't blow it away
Masen Furer 2 月之前
父節點
當前提交
462e734891
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      reflex/compiler/compiler.py

+ 1 - 1
reflex/compiler/compiler.py

@@ -609,7 +609,7 @@ def purge_web_pages_dir():
         return
 
     # Empty out the web pages directory.
-    utils.empty_dir(get_web_dir() / constants.Dirs.PAGES, keep_files=["_app.js"])
+    utils.empty_dir(get_web_dir() / constants.Dirs.PAGES, keep_files=["routes.js"])
 
 
 if TYPE_CHECKING: