vite-plugin-vue-inspector
vite-plugin-vue-inspector copied to clipboard
"Illegal tag name. Use '<' to print '<'." In Nuxt3+pug
Hello!
There's an error in pug:
<template lang="pug">
span(v-if="idx < last_idx")
</template>
This code leads to Illegal tag name. Use '<' to print '<'. error.
However, the code is correct as < sign is used inside a js template.
A simple reproduction is available here - https://stackblitz.com/edit/vitejs-vite-tw7jyk?file=src%2FApp.vue
This issue doesn't appear to be Nuxt-specific. The Pug template is passed as-is to compiler-dom, so the nodeTransforms are also being mis-applied to them. I.e. in the example above, the Hi component can't be inspected, and doesn't receive the data-v-inspector attributes
Had another look at the above issue to see if anything's changed in newer versions.
Excitingly it looks like the current version doesn't have the same issue with <s in the Pug template - but unfortunately it's still unable to inspect components written in pug.