nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
53.97k stars 4.94k forks source link

Nuxt `serverDir` config not working since v3.12.4 #28242

Closed Yizack closed 1 month ago

Yizack commented 1 month ago

Environment

Reproduction

  1. Open https://stackblitz.com/edit/github-cyl8mm?file=nuxt.config.ts
  2. Access the endpoint /api/test

Describe the bug

Hello! I want to report an issue I encountered since v3.12.4, the serverDir config in nuxt.config.ts is not working with the same exact config used in v3.12.3, I'm not sure if it has something to do with the change made in https://github.com/nuxt/nuxt/commit/6abaae7fa1c8656ccd2be0cf5ca80cacc598ad57

Additional context

Inside the reproduction nuxt.config.ts, I'm trying to set myServer folder as server directory instead of server

export default defineNuxtConfig({
  serverDir: './myServer',
});

It has an API endpoint /api/test it should work when I access this endpoint in the app but it doesn't

When I lock the dependency back to "nuxt": "3.12.3" it works.

Logs

No response

stackblitz[bot] commented 1 month ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.