Astro Info
Astro v5.6.1
Node v20.16.0
System macOS (x64)
Package Manager unknown
Output server
Adapter @astrojs/node
Integrations @sentry/astro
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When configured with a base path 'base' and trailingSlash set to 'never', Astro.url.pathname returns /base/ for the root path, while import.meta.env.BASE_URL correctly respects the trailingSlash setting and returns /base, just as document.location.pathname does.
What's the expected result?
In the above example Astro.url.pathname should return '/base'
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-a5kvvtuy?file=astro.config.mjs
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When configured with a
basepath'base'andtrailingSlashset to'never',Astro.url.pathnamereturns/base/for the root path, whileimport.meta.env.BASE_URLcorrectly respects thetrailingSlashsetting and returns/base, just asdocument.location.pathnamedoes.What's the expected result?
In the above example
Astro.url.pathnameshould return'/base'Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-a5kvvtuy?file=astro.config.mjs
Participation