Context
In src/module.ts, the v0.2 server scaffold resolves the server convention file against nuxt.options.serverDir only:
const conventionFile = join(nuxt.options.serverDir, "upload.server.config.ts")
if (!existsSync(conventionFile)) { /* warn + return */ }
This means a upload.server.config.ts contributed by a Nuxt layer (or when this module is consumed from a layer that wants to provide a default config) is ignored — the warning fires and the handler is never registered, even though the file exists somewhere in the project graph.
Proposal
Iterate nuxt.options._layers and check each layer's serverDir for upload.server.config.ts. First-wins (user project overrides layers) is the usual convention in Nuxt.
Repro
- Create a Nuxt layer that exports
server/upload.server.config.ts.
- Extend it from a host app that does not define its own config.
- Expected: server handler registers. Actual: "No server config found" warning, handler skipped.
Notes
Low priority for the initial v0.2 scaffold since most users will put the config directly in their app. Worth resolving before layered usage becomes common.
Context
In
src/module.ts, the v0.2 server scaffold resolves the server convention file againstnuxt.options.serverDironly:This means a
upload.server.config.tscontributed by a Nuxt layer (or when this module is consumed from a layer that wants to provide a default config) is ignored — the warning fires and the handler is never registered, even though the file exists somewhere in the project graph.Proposal
Iterate
nuxt.options._layersand check each layer'sserverDirforupload.server.config.ts. First-wins (user project overrides layers) is the usual convention in Nuxt.Repro
server/upload.server.config.ts.Notes
Low priority for the initial v0.2 scaffold since most users will put the config directly in their app. Worth resolving before layered usage becomes common.