skrawcz commented on code in PR #1488:
URL: https://github.com/apache/hamilton/pull/1488#discussion_r2850735393
##########
ui/backend/server/server/urls.py:
##########
@@ -44,12 +43,50 @@
if settings.HAMILTON_ENV == "mini":
# mini-mode
# TODO -- do meda assets correctly -- this just hardcodes logo.png for now
+ import os
Review Comment:
yeah we are already in this file.
##########
ui/backend/server/server/settings.py:
##########
@@ -147,9 +148,13 @@ def get_from_env(
if HAMILTON_ENV == "mini":
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
STATIC_URL = "/static/"
- STATICFILES_DIRS = [
- os.path.join(BASE_DIR, "build/static/"),
- ]
+ # Support both Vite (assets/) and CRA (static/) build outputs
+ staticfiles_dirs = []
+ if os.path.exists(os.path.join(BASE_DIR, "build/assets/")):
+ staticfiles_dirs.append(os.path.join(BASE_DIR, "build/assets/"))
+ if os.path.exists(os.path.join(BASE_DIR, "build/static/")):
+ staticfiles_dirs.append(os.path.join(BASE_DIR, "build/static/"))
Review Comment:
yep we already are.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]