diff options
author | Lizzy Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-10 00:52:37 -0700 |
---|---|---|
committer | Lizzy Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-10 00:52:37 -0700 |
commit | 523ed99f7b9c178a5082d7be583dde03e0279141 (patch) | |
tree | 3554f31b641d38bc5379df8cadacb15cc1a07da0 | |
parent | a42d1d0323c656dcef1ca17c8556f5e0e95b4549 (diff) | |
download | the-abstraction-engine-523ed99f7b9c178a5082d7be583dde03e0279141.tar.gz the-abstraction-engine-523ed99f7b9c178a5082d7be583dde03e0279141.zip |
fix meta env path
-rw-r--r-- | src/engine/config/assets.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/engine/config/assets.ts b/src/engine/config/assets.ts index 9731ad7..21c7855 100644 --- a/src/engine/config/assets.ts +++ b/src/engine/config/assets.ts @@ -1,11 +1,12 @@ import { type SpriteSpec, SPRITE_SPECS } from "."; import { SOUND_SPECS, SoundSpec } from "./sounds"; -const BASE_URL = import.meta.env.BASE_URL ?? document.location; +let BASE_URL = import.meta.env.BASE_URL || document.location; +BASE_URL = BASE_URL.endsWith("/") ? BASE_URL.slice(0, -1) : BASE_URL; 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); |