[nuxt] [setupSFC] [IDEAS] setupSFC auto imports #449
angelhdzmultimedia
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Auto-import components are not working in JSX, even the normal SFC files ( |
Beta Was this translation helpful? Give feedback.
0 replies
-
The use of setupSFC in layouts is supported in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Now that setupSFC is working in Nuxt (see #429), it opened a window of opportunity for improvements.
Allowing files in
~/components
and~/pages
to be auto imported.For now, we have to import them manually with
import Component from '~/components/component.setup'
.Explicit import:
Auto import:
Final Words
I don't think we need auto imports for~/layouts
, because these are imported using<NuxtLayout name="some layout"/>
.Layouts are not working! I added
~/layouts/main.setup.tsx
, then in~/pages/index.setup.tsx
:Error:
Props to the @vue-macros team for the great job! 😍🔥🎉
Beta Was this translation helpful? Give feedback.
All reactions