fix: adk web not working on some env for windows, fixes https://github.com/google/adk-web/issues/34

PiperOrigin-RevId: 765271751
This commit is contained in:
Yifan Wang 2025-05-30 11:35:29 -07:00 committed by Copybara-Service
parent 65063023a5
commit daac8cedfe

View File

@ -858,6 +858,11 @@ def get_fast_api_app(
return runner
if web:
import mimetypes
mimetypes.add_type("application/javascript", ".js", True)
mimetypes.add_type("text/javascript", ".js", True)
BASE_DIR = Path(__file__).parent.resolve()
ANGULAR_DIST_PATH = BASE_DIR / "browser"