Skip to content

docs wrongly say that in script setup components are automatically registered locally when they are not #1638

Closed
@jacekkarczmarczyk

Description

@jacekkarczmarczyk

Docs

https://vuejs.org/guide/components/registration.html#local-registration

When using SFC with <script setup>, imported components are automatically registered locally:

If they are registered locally it should be possible to do <component is="comp" />

Plaground

https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbiAgaW1wb3J0IENvbXAgZnJvbSAnLi9Db21wLnZ1ZSc7XG48L3NjcmlwdD5cblxuPHRlbXBsYXRlPlxuICA8Y29tcCAvPlxuPC90ZW1wbGF0ZT4iLCJpbXBvcnQtbWFwLmpzb24iOiJ7XG4gIFwiaW1wb3J0c1wiOiB7XG4gICAgXCJ2dWVcIjogXCJodHRwczovL3NmYy52dWVqcy5vcmcvdnVlLnJ1bnRpbWUuZXNtLWJyb3dzZXIuanNcIlxuICB9XG59IiwiQ29tcC52dWUiOiI8dGVtcGxhdGU+Zm9vPC90ZW1wbGF0ZT4ifQ==

Compiled JS

/* Analyzed bindings: {
  "Comp": "setup-const"
} */
import { openBlock as _openBlock, createBlock as _createBlock } from "vue"

import Comp from './Comp.vue';

const __sfc__ = {
  setup(__props) {

  
return (_ctx, _cache) => {
  return (_openBlock(), _createBlock(Comp))
}
}

}
__sfc__.__file = "App.vue"
export default __sfc__

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugErrors and issues people encounter with the docs / repo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions