vitedge icon indicating copy to clipboard operation
vitedge copied to clipboard

Skip props request for static routes

Open frandiox opened this issue 4 years ago • 0 comments

Right now, a props handler file needs to export a handler function. It should be possible to omit this handler and only export cache options. In this scenario, the route can skip the props request in SPA mode while still having access to cache options.

Alternatives:

  • Keep functions/props/routeName.js naming and check the content to see whether handler funciton is exported or not.
  • Use functions/props/routeName.static.js naming.
  • Use functions/props/routeName.json naming. -- It seems nice but it wouldn't have type auto completion.

frandiox avatar Jun 13 '21 10:06 frandiox