Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Is it possible to auto-import from custom directories inside <template> block? - Nuxt
N
Nuxt
•
2w ago
•
4 replies
Pascal Martineau
Is it possible to auto-import from custom directories inside <template> block?
nuxt4
I
'm trying to organize a project and have all my Zod schemas live inside their own directory under app
/schemas
/
. This works just fine by adding
imports: { dirs: ["app/schemas"] }
imports: { dirs: ["app/schemas"] }
inside my
nuxt.config.ts
nuxt.config.ts
, but I can
't use the auto
-imported stuff inside the
<template
> block of my components
, while placing the same files in
app/utils/
app/utils/
makes it work just fine
.
How can I give my custom import directory the same behavior
?
Nuxt
Join
Nuxt Community Chat Server
31,686
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Auto import not working inside template
N
Nuxt / ❓・help
2y ago
How to automatically import custom shared directories
N
Nuxt / ❓・help
8mo ago
Auto-import of /utils not working in VS-Code in template block
N
Nuxt / ❓・help
2y ago
Is it possible to register layers inside module?
N
Nuxt / ❓・help
6mo ago