Create a CLI command to generate middleware files. #73511
alfonsusac
started this conversation in
Ideas
Replies: 1 comment
-
I would love for this to be a feature.. i have the middleware documentation bookmarked at this point :D |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
a. where to place middleware.ts/js
b. what the parameter types are and their return types
Non-Goals
Background
It would help developer experience if we don't need to look up the docs for what the middleware function requries. It is merely an addition to the
next
CLI that is optional for developer to use. They can still write the middleware.ts file manually but It would be great for me to not have to look up the docs everytime I wanted to make the middleware file.Proposal
This feature can be implemented in two ways:
npm next add middleware
.Beta Was this translation helpful? Give feedback.
All reactions