When using `pug` templates with `devTools` enabled: `Illegal tag name. Use '<' to print '<'.`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 214
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 18
Description
Environment
- Operating System: Linux
- Node Version: v16.14.2
- Nuxt Version: 3.5.3
- Nitro Version: 2.4.1
- Package Manager: npm@7.17.0
- Builder: vite
- User Config: devtools
- Runtime Modules: -
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-78ly8d?file=nuxt.config.ts
Describe the bug
When using pug templates with devTools enabled, I can't use the < or > operators inside attributes. They cause this error: Illegal tag name. Use '<' to print '<'. When I disable devTools, the problem goes away.
Additional context
No response
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction and inspect nuxt.config.ts, first confirming the difference between devTools enabled and disabled. Trace how the devTools integration interacts with the Pug template containing < and > in attributes. Done means those operators compile and run in Pug attributes while devTools remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, pug, typescript, vite
- Domain
- devtools, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100