-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add referrerPolicy
option to ReactDOM.preload()
#27096
Add referrerPolicy
option to ReactDOM.preload()
#27096
Conversation
Comparing: 0a36064...24e2703 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
ReactDOM.preload('rp', { | ||
as: 'image', | ||
imageSrcSet: 'rpsrcset', | ||
imageSizes: 'rpsizes', | ||
referrerPolicy: 'no-referrer', | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just make a new test. The preload calls in this test are designed to demonstrate the keying behavior and throwing the ancillary rp preload here is going to maybe be confusing in the future. There is probably already a more generic test acutally that you can just add referrer policy to and just modify the assertions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a new test in 24e2703
### React upstream changes - facebook/react#27096 - facebook/react#27069 - facebook/react#27033 - facebook/react#27061 - facebook/react#27030 - facebook/react#27056
- Depends on facebook/react#27096 - Fixes #43134 - Closes NEXT-811 - Closes NEXT-846
DiffTrain build for commit 9377e10.
Summary
We started using
ReactDOM.preload()
in Next.js but found thereferrerPolicy
option was missing.<preload>
fornext/image
in App Router vercel/next.js#52425How did you test this change?