mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Fix react and react-dom aliases are not properly set for `pages/`
* Remove alias react-dom internals to `{}` in edge runtime as we're using server rendering stub as alias
* Add `react$`, `react-dom$` missing aliases
* Only apply alias to builtin react/react-dom when it's app dir assets.
* Add `react|react-dom/package.json` resolving to require-hook
* Fix hmr issue that sometimes it will perform a reload when a hard navigation is triggered
10 lines
195 B
JavaScript
10 lines
195 B
JavaScript
export const runtime = 'edge'
|
|
|
|
export default (req) => {
|
|
return Response.json(Object.fromEntries(req.headers.entries()), {
|
|
headers: {
|
|
'headers-from-edge-function': '1',
|
|
},
|
|
})
|
|
}
|