Skip to content

fix(nuxt): handle more edge cases with external/custom links#27487

Merged
danielroe merged 11 commits intomainfrom
fix/custom-external-links
Jun 13, 2024
Merged

fix(nuxt): handle more edge cases with external/custom links#27487
danielroe merged 11 commits intomainfrom
fix/custom-external-links

Conversation

@danielroe
Copy link
Copy Markdown
Member

@danielroe danielroe commented Jun 7, 2024

🔗 Linked issue

#25532
resolves #27312

📚 Description

This handles a few things:

  1. improves types for defineNuxtLink so it doesn't require specifying activeClass, exactActiveClass, prefetchedClass
  2. handles basic resolution of object syntax routes when external is passed
  3. does not apply trailing slash behaviour to external links

cc: @Mini-ghost

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe requested a review from harlan-zw June 7, 2024 20:17
Co-authored-by: Alex Liu <dsa1314@gmail.com>
@Mini-ghost
Copy link
Copy Markdown
Member

That's great! I manually tested using external links on <NuxtLink> and checked the reactivity of useNuxtLink. Everything seems to be working as expected now.

Thank you!

@danielroe danielroe marked this pull request as ready for review June 13, 2024 15:28
@danielroe danielroe merged commit 95458af into main Jun 13, 2024
@danielroe danielroe deleted the fix/custom-external-links branch June 13, 2024 15:39
@github-actions github-actions bot mentioned this pull request Jun 13, 2024
@harlan-zw
Copy link
Copy Markdown
Contributor

Nice 👏

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning will appear when passing an external link to <NuxtLink>

3 participants