-
Notifications
You must be signed in to change notification settings - Fork 152
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
feat(early-hints): Add support for image early hint link tags #14827
base: main
Are you sure you want to change the base?
Conversation
#881 Bundle Size — 9.53MiB (-0.16%).bd96269(current) vs ffe4f84 main#484(baseline) Important Bundle introduced 1 and removed 4 duplicate packages – View changed duplicate packages Warning Bundle introduced 3 new packages: web-vitals, @sentry-internal/browser-utils, stylis – View changed packages Bundle metrics
|
Current #881 |
Baseline #484 |
|
---|---|---|
Initial JS | 3.83MiB (-3.01% ) |
3.95MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 83.36% |
2.04% |
Chunks | 139 (-2.8% ) |
143 |
Assets | 143 (-2.05% ) |
146 |
Modules | 5665 ( 0.5% ) |
5637 |
Duplicate Modules | 472 ( 3.74% ) |
455 |
Duplicate Code | 6.17% ( 4.93% ) |
5.88% |
Packages | 282 (-3.09% ) |
291 |
Duplicate Packages | 39 (-7.14% ) |
42 |
Bundle size by type 2 changes
2 improvements
Current #881 |
Baseline #484 |
|
---|---|---|
JS | 9.3MiB (-0.1% ) |
9.31MiB |
Other | 231.39KiB (-2.71% ) |
237.84KiB |
Bundle analysis report Branch damassi/feat/early-hints-images Project dashboard
Generated by RelativeCI Documentation Report issue
997d086
to
8ca7582
Compare
@@ -44,15 44,19 @@ export const renderServerApp = ({ | |||
|
|||
const { WEBFONT_URL } = sharify.data |
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.
Oddly coming from sharify.data
while above it's coming from process.env
.
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.
@dzucconi has a semi-mysterious comment up there so i didn't want to mess with any of those env imports
res.header("Link", [ | ||
`<${CDN_URL}>; rel=preconnect; crossorigin`, | ||
`<${GEMINI_CLOUDFRONT_URL}>; rel=preconnect; crossorigin`, | ||
`<${WEBFONT_URL}>; rel=preconnect; crossorigin`, |
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.
Thought: Now that we're preloading js assets and fonts and a main image, I wonder if we even need these preconnects (that likely refer to the same domains). We can try removing them later.
6068b8c
to
eaaf310
Compare
eaaf310
to
bd96269
Compare
If I understand correctly, this prescribes that components simply render
|
The type of this PR is: Feat
Description
Add support for image early hints (in addition to js, and other preconnects).
Additionally, refactors things slightly to remove the middleware and instead move the header assignment into renderServerApp, where its near our HTML generation.
cc @artsy/diamond-devs