unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

Task cli forces .nitro as buildDir #2634

Closed TMBL-DEV closed 5 days ago

TMBL-DEV commented 2 months ago

Environment

nitro: 2.9.6 node: v20

Reproduction

i think the description together with the link to the code that causes this is more then clear for anyone to understand.

Describe the bug

.nitro forced as buildDir for tasks cli

details

Like the title says currently when you want to run a task through the cli like the docs show you will run into the issue that it forces .nitro to be your build directory.

This is caused by this line

This causes the issue that if you have a custom build directory or if you use nuxt that the task cli won't work.

proposal

utilize the nitro.options.buildDir as the default buildDir for the task cli.

Additional context

No response

Logs

No response