From a42d1d0323c656dcef1ca17c8556f5e0e95b4549 Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Sat, 9 Mar 2024 22:15:53 -0700 Subject: [PATCH] fix meta env path --- src/engine/config/assets.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/config/assets.ts b/src/engine/config/assets.ts index 8cf7685..9731ad7 100644 --- a/src/engine/config/assets.ts +++ b/src/engine/config/assets.ts @@ -1,11 +1,11 @@ import { type SpriteSpec, SPRITE_SPECS } from "."; import { SOUND_SPECS, SoundSpec } from "./sounds"; -const BASE_URL = document.location; +const BASE_URL = import.meta.env.BASE_URL ?? document.location; export const FONT = new FontFace( "scientifica", - `url(${BASE_URL}/fonts/scientifica.ttf)` + `url(${BASE_URL}fonts/scientifica.ttf)` ); FONT.load().then((font) => { document.fonts.add(font);