Ability to have multiple root elements in a functional view.
trusktr opened this issue · 2 comments
Just continuing vuejs/vue#7088 (comment) here.
It can be nice to have multiple roots in template:
<template>
<div class="one"></div>
<div class="two"></div>
</template>
See the other issue for some background.
@trusktr When I wrote to open an issue here, I was referring to the comment before mine, which was talking about multiple root nodes for functional templates. This is probably indeed best solved in vue-loader, so I asked for someone to open an issue about it.
I took the freedom to change the title of your issue accordingly, and your example code should look like:
<template functional>
<div class="one"></div>
<div class="two"></div>
</template>
As explained in the original issue thread, multiple root nodes in normal components wold require a rewrite of large parts of the virtualdom functionality, so if we decided to tackle this, it would be in the Vue core repository.