diff --git a/packages/nuxt3/src/core/nitro-nitropack.ts b/packages/nuxt3/src/core/nitro-nitropack.ts index 7ee8b07d69..bc481f1c5c 100644 --- a/packages/nuxt3/src/core/nitro-nitropack.ts +++ b/packages/nuxt3/src/core/nitro-nitropack.ts @@ -24,9 +24,11 @@ export async function initNitro (nuxt: Nuxt) { private: nuxt.options.privateRuntimeConfig }, output: { - dir: nuxt.options.dev - ? join(nuxt.options.buildDir, 'nitro') - : resolve(nuxt.options.rootDir, '.output') + dir: nitroOptions.output?.dir || ( + nuxt.options.dev + ? join(nuxt.options.buildDir, 'nitro') + : resolve(nuxt.options.rootDir, '.output') + ) }, dev: nuxt.options.dev, preset: nuxt.options.dev ? 'dev' : undefined