Skip to content
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

fix(gatsby-plugin-image): Preload lazy-hydrator #28690

Merged
merged 1 commit into from
Dec 22, 2020
Merged

Conversation

ascorbic
Copy link
Contributor

Preloads the lazy-hydrate bundle, outside of the render path. This ensure there's no delay when navigating to a page with an image

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 18, 2020
@ascorbic ascorbic added topic: media Related to gatsby-plugin-image, or general image/media processing topics and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 18, 2020
Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!


exports.wrapRootElement = ({ element }) => {
return (
<LaterHydrator>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh nice this is clever.

@ascorbic ascorbic added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Dec 22, 2020
@gatsbybot gatsbybot merged commit 6af620c into master Dec 22, 2020
@gatsbybot gatsbybot deleted the fix/preload-hydrator branch December 22, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: media Related to gatsby-plugin-image, or general image/media processing topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants