-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(prerender): support quoted true / false values and 0 / 1 #6772
Conversation
🦋 Changeset detectedLatest commit: 0c36095 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 |
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.
Agree with not documenting this explicitly! LGTM
Looks neat 👍 |
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.
Let's 🚢 it!
Hi @natemoo-re When shipping this I'm getting the following error
And about.astro
Astro version 2.3.0 |
Thanks for the report @samducker! I just opened #6910 which should fix this. |
Thanks @natemoo-re appreciate you, this will help our content editors lives greatly 🚀 |
Changes
export const prerender
support for quoted values of"true" | "false" | 'true' | 'false'
as well as the literal values0
,1
.import.meta.env.MY_VALUE
values statically beforeprerender
is scanned for.Testing
Scan function unit tests have been updated to check
"true" | "false" | 'true' | 'false'
and0 | 1
. Did not testimport.meta.env.MY_VALUE
replacement directly, but can if that seems wise.Docs
This is mostly intended to unblock users that have tried this already, not sure if we want to document this as an explicit feature yet since we might end up with a different pattern for "preview deploys".