ed893fa0d3
### What Use SWC to check invalid client hooks of `next/navigation` imports in server components. Follow up of #62456 Remove the runtime error APIs for `next/navigation` rsc version. Add `next/navigation` react-server version alias in turbopack. This PR also refactored the invalid server layer APIs detection into a map, where key is import path and value is an array of client APIs. During the traversing we will get the import source easily, this makes extending the logic much easier ### Why Previously we're using the runtime error to check it, but it has to run first then the error will be thrown. If we error first in build time with this check it's much faster and we this align on both side between webpack and turbopack. |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |