next.js
17bd232c - Apply react-server transform and valication to middleware (#57448)

Commit
2 years ago
Apply react-server transform and valication to middleware (#57448) Apply `react-server` resolving and server components invalid APIs checking to middleware. We want to limit the react usage in in middleware as so far it's not aimed for rendering purpose. Another invalid case could be: if you're doing react SSR with `renderToString` in middleware it should be disallowed. Imaging it could send the rendered html code to client and you display it in browser. But it might require hydration so it can be broken. This PR will only let you import `react-server` export condition packages.
Author
Parents
Loading