diff --git a/web/app.py b/web/app.py
index a1c084e..630cb69 100644
--- a/web/app.py
+++ b/web/app.py
@@ -37,20 +37,22 @@ class FlaskUser(UserMixin):
def get_id(self):
return self.db_user.telegram_username
-with open("web/static/.vite/manifest.json") as f:
- vite_manifest = json.load(f)
+try:
+ with open("web/static/.vite/manifest.json") as f:
+ vite_manifest = json.load(f)
+except FileNotFoundError:
+ vite_manifest = None
@app.context_processor
def inject_vite_entry():
def vite_entry(file):
- if app.debug:
+ if vite_manifest is None:
return Markup(
dedent(f"""
""").strip())
- else:
- if file in vite_manifest:
+ elif file in vite_manifest:
src = vite_manifest[file]['file']
result = f''
if('css' in vite_manifest[file]):