diff options
author | 2025-01-02 13:26:55 +0000 | |
---|---|---|
committer | 2025-01-02 13:26:55 +0000 | |
commit | 7fb21844dff893c90dc0a07fd13cefdba61d0a45 (patch) | |
tree | 0ad7f509f8e718c043507a524f8175d07d406a6d /packages | |
parent | f12f1118bc4687cc807a4495ffcaafcb0861b7a2 (diff) | |
download | astro-7fb21844dff893c90dc0a07fd13cefdba61d0a45.tar.gz astro-7fb21844dff893c90dc0a07fd13cefdba61d0a45.tar.zst astro-7fb21844dff893c90dc0a07fd13cefdba61d0a45.zip |
fix: injected route entrypoint (#12816)
Diffstat (limited to 'packages')
-rw-r--r-- | packages/astro/src/core/util.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/astro/src/core/util.ts b/packages/astro/src/core/util.ts index f0447529a..dd663de83 100644 --- a/packages/astro/src/core/util.ts +++ b/packages/astro/src/core/util.ts @@ -115,7 +115,11 @@ function isInPagesDir(file: URL, config: AstroConfig): boolean { function isInjectedRoute(file: URL, settings: AstroSettings) { let fileURL = file.toString(); for (const route of settings.resolvedInjectedRoutes) { - if (route.resolvedEntryPoint && fileURL === route.resolvedEntryPoint.toString()) return true; + if ( + route.resolvedEntryPoint && + removeQueryString(fileURL) === removeQueryString(route.resolvedEntryPoint.toString()) + ) + return true; } return false; } |