framework icon indicating copy to clipboard operation
framework copied to clipboard

Using custom in `***.tsx`.

Open HomWang opened this issue 3 years ago • 1 comments

Environment

  • Operating System: MacOS
  • Node Version: v16.16.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: extends, build, nitro, vite
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Error litelement Failed to execute 'define' on 'CustomElementRegistry'

Describe the bug

When using custom components in components/TestApp.tsx, an error will be reported in server. but there is no problem when using custom components in .vue

Added nuxt.config.ts

build: {
        transpile: ['bg']
},
vue: {
    compilerOptions: {
            isCustomElement: (tag) => tag.includes('bg-')
    }
}

Additional context

No response

Logs

No response

HomWang avatar Nov 21 '22 07:11 HomWang