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

Nuxt 3 preloads all pages, styles, fonts, svg. Adds everything in head to rel="prefetch" #14261

Closed
Aleksandr-om opened this issue Jul 4, 2022 · 1 comment

Comments

@Aleksandr-om
Copy link

Aleksandr-om commented Jul 4, 2022

Environment

  • Operating System: Ubuntu
  • Node Version: v16.15.1
  • Nuxt Version: 3.0.0-rc.4 / v3.0.0-rc.4-27611167.a41644e
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: target, nitro, runtimeConfig, css, buildDir, modules, intlify, typescript, build
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/Aleksandr-om/nuxt-3-issue/tree/main/nuxt-app

git clone https://github.com/Aleksandr-om/nuxt-3-issue.git
cd nuxt-app
yarn install
yarn build
yarn start

Describe the bug

Preloading of pages, fonts, styles, images does not work correctly

  • Installed the latest Nuxt.
  • Added a few pages. test-no-preload* - there are no links to these pages anywhere. two-page.vue - we can go to this page from the main one.
  • Added styles to each page with the loading of woff and woff2 fonts.

After the project is built and launched, Nuxt preloads all data and pages.


As you can see, all resources are added to the preload <link rel="prefetch" ...>, all pages, even those that are not used anywhere.

Should work like on https://nuxt-prefetch.surge.sh/
Only those pages should be preloaded, links to which are visible in the browser and after the current page is fully loaded.
Also, fonts should not be preloaded from all pages in advance.

Additional context

No response

Logs

No response

@Aleksandr-om Aleksandr-om changed the title nuxt preloads all pages, styles, fonts, svg. Adds everything in head to rel="prefetch" Nuxt preloads all pages, styles, fonts, svg. Adds everything in head to rel="prefetch" Jul 4, 2022
@Aleksandr-om Aleksandr-om changed the title Nuxt preloads all pages, styles, fonts, svg. Adds everything in head to rel="prefetch" Nuxt 3 preloads all pages, styles, fonts, svg. Adds everything in head to rel="prefetch" Jul 4, 2022
@danielroe
Copy link
Member

let's track in #13778.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants