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

new v-slot syntax not working with lazy loaded components inside slot template #9436

Closed
plehnen opened this issue Feb 6, 2019 · 2 comments
Closed

Comments

@plehnen
Copy link

plehnen commented Feb 6, 2019

Version

2.6.2

Reproduction link

https://codepen.io/anon/pen/ZwXRKJ

Steps to reproduce

Since 2.6.x when using the new v-slot syntax the following will not work:

<template #header>
  <my-component></my-component>
</template>

When the component is imported "lazy" like this:

components: {
  MyComponent: () => import('./MyComponent'),
},

This worked with the old slot syntax.

Now just nothing is shown. Only if the dom is refreshed (e.g. by some display toggle) the component is shown afterwards. But not on the first load.
Another workaround is not to use lazy imports and directly import the component.

What is expected?

v-slots should work with lazy loaded components like it did with the old slot syntax.

What is actually happening?

It is not shown (until the dom is reloaded)


Unfortunately I could not reproduce this async issue with codepen.

It took me quite a while to figure out it is the lazy import which causes my page is not working correctly anymore after updating to 2.6.2.

@DRoet
Copy link

DRoet commented Feb 6, 2019

might be related to: #9432

@yyx990803
Copy link
Member

Duplicate of #9432. Fixed in dev by b9de23b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants