v3.1 (March 2021 #2)

Welcome to gatsby@3.1.0 release (March 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

Fast Refresh Dark Mode

Gatsby’s Fast Refresh modal now respects the prefers-color-scheme setting from your operating system. Depending on your setting you’ll see the overlay in light or dark mode — which is great because it makes the modal more accessible!

Showing a toggle between light and dark mode

Improved Error Messages

We’ve seen many complaints about the unspecific error "Error page resources for <path> not found. Not rendering React". There are many reasons why this could happen so we improved our error logging to output the original error. As usual you’ll see the error in DevTools console or in your error tracker.

Consider the following example, it now shows the actual error.

Browser console showing the actual error

In development mode we also now show the original error when it occurs in gatsby-browser.js or outside of React components.

Fast Refresh overlay showing an error that happened outside of React

Contentful gatsbyImageData is stable

Contentful now fully supports gatsby-plugin-image out of the box. You can find the official docs for gatsby-plugin-image in gatsby-source-contentful the official contentful plugin docs

You can find more information on how to switch to gatsby-plugin-image by going to our gatsby-image to gatsby-plugin-image migration guide


Notable bugfixes

  • gatsby: Fix routing when path starts with @ symbol, via PR #29935
  • gatsby: Fix incremental builds when remove trailing slashes is used, via PR #29953
  • gatsby: Add build stage to custom babel-preset-gatsby configurations, via PR #30047
  • gatsby: Fix hanging Gatsby process between webpack rebuilds in development, via PR 30127
  • gatsby: fix SitePage schema, via PR #30132
  • gatsby: fix double save during gatsby develop, via PR #30193
  • gatsby-plugin-image: Handle placeholder in plugin toolkit correclty, via PR #30141
  • gatsby-source-contentful: fix deprecation warnings, via PR #29675

Contributors