vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.04k stars 27k forks source link

Support dynamicIO in middlware routes and generateStaticParams #70544

Closed gnoff closed 1 month ago

gnoff commented 1 month ago

route.ts files (and other routes like metadata routes) still need dynamicIO semantics when runnign in edge runtime. This change adds support for configuring dynamicIO for edge routes. It is hard to test properly because edge routes never statically generate and at the moment there are no other observable semantics. If we introduce new semantics that are distinct for dynamicIO that affect dynamic rendering we should update these tests to assert them.

Similarly generateStaticParams also needs dynamicIO semantics when configured. Right now it's not quite possible to assert this because there are no observable semantics. We should have one which is that fetchCache is not configurable with dynamicIO on however that isn't implemented yet. This change adds tests but they will need to be updated once we update the fetchCache behavior

ijjk commented 1 month ago

Tests Passed