Skip to content

How import a component defined by setup? #5934

Answered by tony19
yoyo837 asked this question in Help/Questions
Discussion options

You must be logged in to vote

Sounds like you're trying to use named imports like this:

import { Layout } from './components/common/Layout.vue'

But the component only has a default export (as indicated in the error message), so just import it as:

import Layout from './components/common/Layout.vue'

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yoyo837
Comment options

@tony19
Comment options

Answer selected by yoyo837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants