framework icon indicating copy to clipboard operation
framework copied to clipboard

page prefetch extra resource that use from other pages (middleware, layouts)

Open annndddy opened this issue 3 years ago • 0 comments

Environment

  • Operating System: Windows_NT
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.13
  • Nitro Version: 0.6.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/annndddy/test2

yarn run build yarn run preview visit http://localhost:3000/

Describe the bug

prefetch when visit the index page, the middleware and layouts used by other page (admin.vue, which is not prefetched) is prefetched

Additional context

tried to add below render options to nuxt.config.ts but not works

render: { resourceHints: false, bundleRenderer: { shouldPrefetch: () => { return false } } }

Logs

No response

annndddy avatar Nov 15 '22 03:11 annndddy