diff --git a/reflex/experimental/assets.py b/reflex/experimental/assets.py index 36a4b6885..a8c01240b 100644 --- a/reflex/experimental/assets.py +++ b/reflex/experimental/assets.py @@ -6,6 +6,7 @@ from pathlib import Path from typing import Optional from reflex import constants +from reflex.utils.exec import is_backend_only def asset( @@ -48,7 +49,7 @@ def asset( The relative URL to the asset. """ assets = constants.Dirs.APP_ASSETS - backend_only = os.environ.get(constants.ENV_BACKEND_ONLY, "false").lower() == "true" + backend_only = is_backend_only() # Local asset handling if not shared: