Skip to content

Conditionally changing the order of slots works incorrectly in --env=production mode of Vue. #6997

Closed
@timbenniks

Description

@timbenniks

Version

2.5.2

Reproduction link

https://codepen.io/timbenniks/pen/oMzbzZ

Steps to reproduce

After opening the codepen please click on the "toggle" button.

What is expected?

The slots which show the numbers should inverse when clicking on the toggle button. Their order is changed with a v-if condition.

What is actually happening?

The slots do not switch order. The first slot seems to switch, the second slot seems to stay in place.

Instead of:
1,2 to 2,1

This happens:
1,2 to 2,2

We have tried this with more slots and the results are unpredictable.


We are changing the order of slots for features that change location on small or big screens. Sometimes the structure of a page changes too much so we change the order of slots to manage this. We only noticed the bug when we set the env to production. All works fine in development mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions