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

Define `devHandler` as `handler` #2683

Closed Barbapapazes closed 1 month ago

Barbapapazes commented 1 month ago

Describe the feature

Hello,

Actually, it's possible to define devHandler in the configuration file but it uses a direct defineEventHandler. This behavior differs from 'handler` and makes it really complicated to use within a module or from a larger config files likes the Nuxt one.

Do you think it could be possible to define a devHandler using a simple string that refer to an file?

Additional information