vite-plugin-vue-inspector icon indicating copy to clipboard operation
vite-plugin-vue-inspector copied to clipboard

"Illegal tag name. Use '&lt;' to print '<'." In Nuxt3+pug

Open safic2 opened this issue 2 years ago • 4 comments

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 '&lt;' to print '<'. error.

However, the code is correct as < sign is used inside a js template.

safic2 avatar Aug 04 '23 23:08 safic2

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

CS-Birb avatar Nov 05 '23 09:11 CS-Birb

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.

CS-Birb avatar Dec 30 '23 09:12 CS-Birb