Skip to content
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

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

Merged
merged 11 commits into from
Jun 13, 2024

Conversation

danielroe
Copy link
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

Copy link

stackblitz bot commented Jun 7, 2024

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
@Mini-ghost
Copy link
Contributor

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
60 checks passed
@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
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