Skip to content

fix(v9/astro): Construct parametrized route during runtime #17227

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

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Jul 30, 2025

Backport of #17190

s1gr1d and others added 2 commits July 30, 2025 13:51
For v9, the changes were already reverted in this PR
(#17179) to create
a quick fix we can release soon. However, this removed some
parametrization.

This PR here not only fixed the problem with continuously writing to
`globalThis` to share build-time data with the runtime (we don't do this
anymore). The route parametrization now happens only during runtime, as
we have access to the route segments at runtime with Astro v5.

This adds a **little** performance overhead when compared with the
previous approach (the route segments are now constructed during
runtime) - but this is not an expensive operation. The `.find` method
was used in the previous approach as well.


Fixes #17179
@s1gr1d s1gr1d requested review from Lms24 and andreiborza July 30, 2025 11:58
@s1gr1d s1gr1d enabled auto-merge (squash) July 30, 2025 12:01
@s1gr1d s1gr1d merged commit 84db754 into v9 Jul 30, 2025
145 of 146 checks passed
@s1gr1d s1gr1d deleted the sig/v9-astro-param branch July 30, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants