#1545 recently simplified the way that plugin authors specify middleware. We should do a similar simplification for routes: don't require slashes at the beginning, as this is confusing. The plugin loader does this:
`./routes${route.path}.ts`
but it should instead check to see if route.path has a leading slash, and add one if not present. We'll need tests for this new functionality, and to make sure the old style doesn't break.
@bjesuiter, I think this is the last of the work resulting from our discussion.
from: #1545 (comment)
#1545 recently simplified the way that plugin authors specify middleware. We should do a similar simplification for routes: don't require slashes at the beginning, as this is confusing. The plugin loader does this:
`./routes${route.path}.ts`but it should instead check to see if
route.pathhas a leading slash, and add one if not present. We'll need tests for this new functionality, and to make sure the old style doesn't break.@bjesuiter, I think this is the last of the work resulting from our discussion.
from: #1545 (comment)