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

[Feature request] option default links prefetch behavior #3263

Open
Yves852 opened this issue Feb 7, 2025 · 0 comments
Open

[Feature request] option default links prefetch behavior #3263

Yves852 opened this issue Feb 7, 2025 · 0 comments
Labels
enhancement New feature or request triage

Comments

@Yves852
Copy link

Yves852 commented Feb 7, 2025

Description

Support either Nuxt config override or feat a config option to override prefetch behavior.

The default behavior of internal links are prefetchOn: { visibility: true } in Nuxt.

Changing it only affects <NuxtLink>. Nuxt UI components featuring links ignore this parameter and preserve prefetching on visibility.

// nuxt.config.ts 
  experimental: {
    defaults: {
      nuxtLink: {
        // Don't affect Nuxt UI components
        prefetchOn: { interaction: true, visibility: false },
      },
    },
  },

I can add props on each component (no-prefetch or prefetch-on="interaction") thought but could be comfort to be able to change the default behavior

Thanks.

Additional context

No response

@Yves852 Yves852 added enhancement New feature or request triage labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
None yet
Development

No branches or pull requests

1 participant