meta components don't render within pug
Open
Nobody has claimed this yet.
bridge
upstream-bug
- Dominant language
- TypeScript
- Stars
- 285
- Forks
- 33
- Avg merge
- 22h 38m
- Merged PRs (30d)
- 3
Description
Environment
- Operating System:
Linux - Node Version:
v16.12.0 - Nuxt Version:
2.16.0-27358576.777a4b7f - Package Manager:
npm@8.1.0 - Builder:
webpack - User Config:
- - Runtime Modules:
- - Build Modules:
-
Reproduction
https://codesandbox.io/s/meta-components-mfm825-mfm825?file=/pages/index.vue
/index.vue
<template lang="pug">
div
Html.index-class(index-html-attr)
Head
Title index title
h1 hello index
div: nuxt-link(to="/foo") foo
</template>
/foo.vue
<template lang="pug">
div
Html.foo-class
Head
Title foo title
Script(src="/foo-script-nested-in-html-tag.js")
Script(src="/foo-script-out-of-html-tag.js")
h1 hello foo
div: nuxt-link(to="/") index
</template>
Describe the bug
The repro demonstrates several bugs:
Htmltag's class not work.Titlenot work.Scriptnested inHtmlnot work
Additional context
No response
Logs
[Vue warn]: "class" is a reserved attribute and cannot be used as component prop.
[Vue warn]: "is" is a reserved attribute and cannot be used as component prop.
[Vue warn]: "slot" is a reserved attribute and cannot be used as component prop.
[Vue warn]: "style" is a reserved attribute and cannot be used as component prop.
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 /index.vue and /foo.vue reproductions in the linked CodeSandbox, comparing the Pug templates with their rendered output and the listed Vue warnings. Verify the Html class, Title, and nested Script behavior in both pages; done means these meta components render with their attributes, titles, and scripts as shown in the examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pug
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100