-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve base slash when trailingSlash ignore #7878
Conversation
🦋 Changeset detectedLatest commit: 044acba The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
a50fed5
to
54c158a
Compare
dd0b9ad
to
c4cd8d6
Compare
c4cd8d6
to
8441295
Compare
8441295
to
c97e57d
Compare
c97e57d
to
5775b4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bluwy! Left some changeset and docs comments.
4bad885
to
044acba
Compare
Merging this in as the examples check is blocked by #7998 |
Changes
fix #6623
When
trailingSlash
is set toignore
, theimport.meta.env.BASE_URL
will have a string that's the same asconfig.base
as-is. Unlikealways
where it always adds a trailing slash, and unlikenever
where it'll never have a trailing slash.Since the issue was created, looks like docs now document the old, different behaviour:
where
ignore
would work likealways
(Always have a trailing slash). Perhaps we should discuss if this change makes sense?Testing
Updated some tests to fix the old behaviour, the rest should still pass.
Docs
Added changelog, and updated docs in
astro.ts
/cc @withastro/maintainers-docs for feedback!