Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

v4.2 Release Notes

Welcome to gatsby@4.2.0 release (November 2021 #2)

Key highlights of this release:

Also check out notable bugfixes.

Bleeding Edge: Want to try new features as soon as possible? Install gatsby@next and let us know if you have any issues.

Previous release notes

Full changelog


gatsby-source-contentful v7

We’re releasing a new major version of gatsby-source-contentful as the support for gatsby-image is dropped in favour fo the superior successor gatsby-plugin-image. Read the Migrating from gatsby-image to gatsby-plugin-image guide to learn more. The PR #33528 implemented this change.

You can also use AVIF images with Contentful now as the PR #33903 added support for this image format — use the new gatsby-plugin-image to use it.

getServerData improvements

A couple of improvements were made to the new Server-Side Rendering API inside Gatsby:

  • The response headers are now also applied during gatsby develop, via PR #33810

  • You can (and should) use process.env.* environment variables inside getServerData, via PR #33690

  • The status code returned by getServerData is respected now, via PR #33914. Please use this syntax (see reference guide):

Framework Version Support

You can find the support plans for the major versions of Gatsby on the newly created page Gatsby Framework Version Support.

Notable bugfixes & improvements

  • A lot of internal dependency updates to each package, e.g. bumping sharp to 0.29.2. You can check the CHANGELOG.md file in each package’s folder for the details
  • gatsby: Test files inside the src/api (Gatsby Functions) directory are now excluded by default, via PR #33834
  • gatsby-source-wordpress:
    • Fix for 'createRoot' is not exported from 'react-dom' (imported as 'ReactDOM'). warning, via PR #33991
    • Hydrate images in develop on first occurrence, via PR #33989
  • gatsby-core-utils: Add retry on HTTP status codes to fetchRemoteFile, via PR #33461
  • Content Sync:

Contributors

A big Thank You to our community who contributed to this release 💜

Start building today on Netlify!
Edit this page on GitHub
© 2023 Gatsby, Inc.