-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
needs triageIssue needs to be triagedIssue needs to be triaged
Description
Astro Info
Astro v5.17.1
Vite v6.4.1
Node v24.13.0
System Linux (x64)
Package Manager npm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When base is unset, and trailingSlash is never, the import.meta.env.BASE_URL is /, which makes it awkward to use to construct urls to other pages. It means I cannot depend on the setting of trailingSlash when creating a url relative to the base, and need to always check if there is a trailing slash anyways.
What's the expected result?
import.meta.env.BASE_URL should be an empty string if trailingSlash is never and base is unset, an empty string, or /.
Link to Minimal Reproducible Example
https://github.com/eblocha/astro-base-tralingslash
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs triageIssue needs to be triagedIssue needs to be triaged