Astro Info
Astro v5.1.7
Node v23.5.0
System macOS (arm64)
Package Manager pnpm
Output static
Adapter none
Integrations
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
This is my astro.config.ts:
export default defineConfig({
trailingSlash: 'never',
i18n: {
locales: ['en', 'fr'],
defaultLocale: 'en',
},
});
using getRelativeLocaleUrl('fr', '') or getRelativeLocaleUrl('fr', '/') returns /fr/ (a string with a trailing slash) even though trailingSlash: never is set in the config. The same goes for getAbsoluteLocaleUrl
What's the expected result?
If I defined trailingSlash: never, I expect that getRelativeLocaleUrl and getAbsoluteLocaleUrl return paths without a trailing slash (with the possible exception of the root path)
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bvnpwdin
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
This is my
astro.config.ts:using
getRelativeLocaleUrl('fr', '')orgetRelativeLocaleUrl('fr', '/')returns/fr/(a string with a trailing slash) even thoughtrailingSlash: neveris set in the config. The same goes forgetAbsoluteLocaleUrlWhat's the expected result?
If I defined
trailingSlash: never, I expect thatgetRelativeLocaleUrlandgetAbsoluteLocaleUrlreturn paths without a trailing slash (with the possible exception of the root path)Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bvnpwdin
Participation