mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### Issue x-ref: https://github.com/vercel/next.js/actions/runs/5469070005/jobs/9957658991?pr=52282#step:27:526 metadata tests are failing as flaky recently, then after digging into it, noticed it as a hmr issue. **Steps to repro with metadata test app** The later (after the 1st one) visited page with client components imports sometimes throw an full reload refresh warning > Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree. Turns out there's some unexpected hmr events when `"sync"` event is triggered, and client tries to apply the updates but then failed. This PR excludes the triggering by `"sync"` for RSC pages updates. `'sync'` event with errors/warnings will still be handled and then `'built'` event will be handled with hot reload updates Possibly related to #40184
8 lines
177 B
TypeScript
8 lines
177 B
TypeScript
export function GET() {
|
|
return new Response('console.log("hello from preload")', {
|
|
headers: {
|
|
'Content-Type': 'application/javascript; charset=utf-8',
|
|
},
|
|
})
|
|
}
|