Open bencodezen opened 1 year ago
I think this seems like a good idea and if @pi0 agrees would be more than happy to chat about how this could be implemented.
I like the idea of making some warnings, especially for wild card /**
rules.
However, it is tricky when we exactly want to make such warning.
We might for example instead make a change to cache handler, bypassing POST requests fixing root cause of a cache on ** problem.
Describe the feature
⚠️ Problem
When a user configures their
routeRules
, it is currently possible to define conflicting routes that will break the intended build. For example:This seems straightforward at first, but if users are leveraging an
/api
route or other serverless functions that require a POST request, their build will ultimately fail.💡 Proposed Solution
When the build detects that there will be some output that leverages APIs or serverless functions, there should probably be a warning (if not an actual failure) on the build because the distributed output will fail otherwise.
📝 Additional information
I'd be happy to help, but would probably need some pairing with a team member to get onboarded to the nitro engine and the team workflow.