Skip to content

fix(@angular-devkit/build-angular): ensure route has leading slash in prerender builder#33014

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:leading-slash
Apr 16, 2026
Merged

fix(@angular-devkit/build-angular): ensure route has leading slash in prerender builder#33014
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:leading-slash

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

Ensures that the route always starts with a leading slash when calling the render function, preventing potential issues with relative paths or incorrect URL resolution during prerendering.

… prerender builder

Ensures that the route always starts with a leading slash when calling the render function, preventing potential issues with relative paths or incorrect URL resolution during prerendering.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the prerender builder to ensure that routes are prefixed with a leading slash during the universal rendering process. The review feedback suggests improving code readability by using startsWith('/') instead of index access and recommends centralizing the route normalization logic to prevent fragmentation and redundant checks across the codebase.

@alan-agius4 alan-agius4 requested a review from clydin April 16, 2026 08:33
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 16, 2026
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 16, 2026
@alan-agius4 alan-agius4 merged commit 30d8332 into angular:main Apr 16, 2026
38 of 39 checks passed
@alan-agius4 alan-agius4 deleted the leading-slash branch April 16, 2026 12:04
@alan-agius4
Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular-devkit/build-angular target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants