Files
a5a47b2a6e fix: throw error during build when invalid export for Proxy (#84886)
### Why?

When Proxy/Middleware had invalid exports (valid: named function `proxy`
for `proxy.js`, named function `middleware` for `middleware.js`, or
default function), it errored during runtime but not during build.

This error can sneak into production as it only throws during runtime.

### How?

Walk AST of the Proxy/Middleware file, and if a valid export is not
found, throw during build.

---------

Co-authored-by: Benjamin Woodruff <[email protected]>
2025-10-17 04:24:04 +02:00

9 lines
174 B
TypeScript

import { ReactNode } from 'react'
export default function Root({ children }: { children: ReactNode }) {
return (
<html>
<body>{children}</body>
</html>
)
}