bridge icon indicating copy to clipboard operation
bridge copied to clipboard

meta components don't render within pug

Open caikan opened this issue 3 years ago • 2 comments

Environment


  • Operating System: Linux
  • Node Version: v16.12.0
  • Nuxt Version: 2.16.0-27358576.777a4b7f
  • Package Manager: [email protected]
  • 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:

  • Html tag's class not work.
  • Title not work.
  • Script nested in Html not 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.

caikan avatar Mar 15 '22 23:03 caikan

I think this is likely the same issue that is being solved in https://github.com/antfu/unplugin-vue2-script-setup/pull/124.

cc: @antfu

danielroe avatar Mar 16 '22 11:03 danielroe

Reproduction: https://stackblitz.com/edit/github-nubkan.

Note that this is likely not a bug in Nuxt Bridge.

danielroe avatar Jul 09 '22 16:07 danielroe