[FR] Optional root `<template>` when the templating language is html
What problem does this feature solve?
Currently, when authoring components in SFC, we have to add a root <template>
tag:
<script lang="ts" setup>
// ...
</script>
<template>
<div>Content</div>
</template>
Would be nice to be able to omit the root <template>
tag when the templating language is html:
<script lang="ts" setup>
// ...
</script>
<div>Content</div>
The above syntax is closer to writing html files, therefore more natural and intuitive, Svelte does this by default, would be great if Vue supports it too.
What does the proposed API look like?
<script lang="ts" setup>
// ...
</script>
<div>Content</div>