Astro Info
Astro v4.2.8
Node v18.18.0
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations @astrojs/mdx
@astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
Using the config below, getRelativeLocaleUrl("es", "/") outputs /es/ instead of /es. It seems that this only happens with the home path. This also affects the other i18n functions.
const config = {
trailingSlash: 'never',
build: {
format: 'file',
},
i18n: {
defaultLocale: "en",
locales: ["en", "es"],
routing: {
prefixDefaultLocale: false,
}
}
What's the expected result?
I expected that trailingSlash: 'never' option should never output urls with trailing slash.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xz2dyx?file=astro.config.mjs
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
Using the config below,
getRelativeLocaleUrl("es", "/")outputs/es/instead of/es. It seems that this only happens with the home path. This also affects the other i18n functions.What's the expected result?
I expected that
trailingSlash: 'never'option should never output urls with trailing slash.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xz2dyx?file=astro.config.mjs
Participation