Skip to content

Incorrect preview command in nitro.json when output.publicDir option is set #2948

@alSergey

Description

@alSergey

Environment

  • Node - v20.18.1
  • Npm - 10.8.2
  • Nitropack - 2.10.4

Reproduction

  1. Open Stackblitz
  2. Run npx nuxi generate
  3. Open dist/nitro.json

Describe the bug

Due to the fact that the command npx serve ./public is generated instead of npx serve ./, npx nuxi preview does not work correctly and the server does not start.

Is it possible to change preview command to npx serve ./ when output.publicDir option is set?

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions