nuxt / components

Scan and auto import components for Nuxt.js 2.13+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to preload auto imported components on page?

AlMuz opened this issue · comments

Describe the bug
Hello, after update v2.0.0 all auto-imported components will be loaded after page load, not before.
On my project all components are auto-imported. I have one page where are auto-imported component with id.
On my navbar i have link to this page with this id. So i expect - when i click this link - its redirect me to the page and scroll down to the section with id. But now, it doesn't work on first visit of page. And this problem is only on dev server.

To Reproduce
Steps to reproduce the behavior:

  1. Open this project https://codesandbox.io/s/morning-feather-0i45x?file=/layouts/default.vue and wait for build ends.
  2. Click on 'Manually imported' link - page being scrolled down to the contact section.
  3. Click on 'Auto imported' link - page changed but not scrolled down.
  4. Refresh page - all works fine and page is already on the bottom.

Expected behavior
I expect to see my page scrolled down to the section with id for the auto-imported component