diff options
Diffstat (limited to 'apps/website/src/components/logos')
| -rw-r--r-- | apps/website/src/components/logos/Logo.astro | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/website/src/components/logos/Logo.astro b/apps/website/src/components/logos/Logo.astro index 7988092..6b085fa 100644 --- a/apps/website/src/components/logos/Logo.astro +++ b/apps/website/src/components/logos/Logo.astro @@ -1,4 +1,6 @@ --- +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; import type { LogoType } from '@webtypes/Config'; import type { HTMLAttributes } from 'astro/types'; @@ -18,8 +20,9 @@ let svg: string | undefined; try { if (logo === undefined) return; - const dir = '../../../public/media'; - svg = (await import(/* @vite-ignore */ `${dir}/${logo.replaceAll('.', '/')}.svg?raw`)).default; + + const dir = new URL(join('..', '..', '..', 'public', 'media'), import.meta.url).pathname; + svg = (await readFile(`${dir}/${logo.replaceAll('.', '/')}.svg`, { encoding: 'utf8' })); if (svg === undefined) return; |
