#Issue with trailing slash

3 messages · Page 1 of 1 (latest)

hollow junco
#

I am having issues understanding the use of trailingSlash:"never" setting in both dev and production on v4.0.9. I don't think this is a #bug so far.

In dev mode, everything works as expected but in production the trailing slash is always present.

For example, setting href for this anchor tag <a href={Astro.url.pathname +/my-page} /> would produce these results

DEV: <a href="my_current_path/my-page">

PRODUCTION: <a href="my_current_path//my-page">

Is there a workaround to this? I have spent a few hours reading docs and GitHub issues and can't seem to get how it works.

sleek crystal
#

Where are you hosting the production version? There may be a setting there that's adding the trailing slash.

hollow junco