thomasfjordside
thomasfjordside
NNuxt
Created by thomasfjordside on 6/25/2024 in #❓・help
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 Is this expected behavior and the server folder only supports .ts in layers or is it a possible bug?
1 replies
NNuxt
Created by thomasfjordside on 7/6/2023 in #❓・help
using useRuntimeConfig inside server route in Nuxt Layer
Is it possible to access useRuntimeConfig via #imports or #app in a server route in a Nuxt Layer.
I get an error like this Package import specifier "#imports" is not defined in package ....\...\package.json I am moving a server route and a component into a Nuxt Layer and now it seems useRuntimeConfig is not auto imported in that case. Any pointers are very welcome
1 replies