© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
autoimports in server folder is not working if using js files - Nuxt
N
Nuxt
•
2y ago
thomasfjordside
autoimports in server folder is not working if using js files
The auto import of defineEventHandler
(and the rest
) is not working in
.js files within a server folder inside a layer
.
The autoimport is working fine if the file is in the top level app instead of the layer or if the file is a
.ts file
.
I have been able to replicate this with a new layer using the starter template
:
npx nuxi init --template layer
npx nuxi init --template layer
Is this expected behavior and the server folder only supports
.ts in layers or is it a possible bug
?
Recent Announcements
Similar Threads
autoimports not updating
N
Nuxt / ❓・help
2y ago
Using useFetch in the /server folder
N
Nuxt / ❓・help
4y ago
/server folder
N
Nuxt / ❓・help
13mo ago
Eslint in the server folder
N
Nuxt / ❓・help
10mo ago