You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, when using Nuxt layers to extend the server API endpoints, the "top-level" endpoints do not override "sub-level" endpoints; instead they're just being appended to the list of handlers. They're then being added to the server output file even though they will never be called as Nitro will first match the top-level handlers, which increases the file size and the transpiling process duration. A very simple fix would be to filter unique route/method pairs here to make sure only a single handler per route is being added: https://github.com/unjs/nitro/blob/1c4d6e1fba7be6923e80cefbde541f47fc9582f2/src/scan.ts#L20
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Describe the feature
Right now, when using Nuxt layers to extend the server API endpoints, the "top-level" endpoints do not override "sub-level" endpoints; instead they're just being appended to the list of handlers. They're then being added to the server output file even though they will never be called as Nitro will first match the top-level handlers, which increases the file size and the transpiling process duration. A very simple fix would be to filter unique route/method pairs here to make sure only a single handler per route is being added:
https://github.com/unjs/nitro/blob/1c4d6e1fba7be6923e80cefbde541f47fc9582f2/src/scan.ts#L20
Additional information
The text was updated successfully, but these errors were encountered: