Subscribe on changes!

Compiles error using slot inside component with specifying `lang` of <template> as empty string.

avatar
Jan 18th 2021

Version

3.0.5

Reproduction link

https://codesandbox.io/s/sweet-pike-uof96

Steps to reproduce

https://codesandbox.io/s/sweet-pike-uof96

<template lang="">
  <hello-world>
    <template v-slot:default> Slot Message </template>
  </hello-world>
</template>

What is expected?

Vue compiles with default template language.

What is actually happening?

VueCompilerError: Invalid end tag.


Btw, if attributes resemble <template lang=""></template> is not allowed, the compiler should tell something relevant.

It costs me some time to figure it out with Invalid end tag point to the end of slot-contained-component (</hello-world>).

avatar
Jan 19th 2021

After doing some verification, an error was reported in helloworld.vue, ‘The template root disallows'' elements ’