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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
route.tsx
files to export other functions other thanGET
,POST
, etcNon-Goals
No response
Background
I am developing an alternative implementation of server actions with a custom directive here: https://github.com/remorses/server-actions-for-next-pages
An example of an actions file:
This file will be tranformed by a loader to create a valid route.ts file.
The problem is that Next.js during build does not allow you to have other exports other than
GET
,POST
, etcI think it would be better if the Typescript plugin added a warning for these cases instead of an error.
Proposal
Turn the error
x is not a valid Route export field.
into a warning for route filesBeta Was this translation helpful? Give feedback.
All reactions