0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

fix: injectTypes path (#11774)

This commit is contained in:
Florian Lefebvre 2024-08-19 20:04:51 +02:00 committed by GitHub
parent 826dc2a85a
commit c6400ab99c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fixes the path returned by `injectTypes`

View file

@ -351,7 +351,9 @@ export async function runHookConfigDone({
content: injectedType.content,
});
return new URL(normalizedFilename, settings.config.root);
// It must be relative to dotAstroDir here and not inside normalizeInjectedTypeFilename
// because injectedTypes are handled relatively to the dotAstroDir already
return new URL(normalizedFilename, settings.dotAstroDir);
},
logger: getLogger(integration, logger),
}),