New Launch

Take a deep dive into the fastest Gatsby, yet: Gatsby 5!

v4.9 Release Notes

Welcome to gatsby@4.9.0 release (March 2022 #1)

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


Support for TypeScript in gatsby-config and gatsby-node

In the last release we added support for TypeScript in gatsby-browser and gatsby-ssr and as a follow-up we’re introducing a much requested feature: Support for TypeScript in gatsby-config and gatsby-node 🎉

When you try it out in your project, please give us feedback in the accompanying RFC on what you like, what doesn’t work, and what you like to see in the future. Note: There are currently some limitations that you’ll need to be aware of. In the RFC you can also read why we chose Parcel for this feature and how we did it.

You can learn everything about this new feature on the TypeScript and Gatsby documentation page but here are two small examples of gatsby-config and gatsby-node with TypeScript:

You can also check out the using-typescript and using-vanilla-extract examples!

Migrating away from old workarounds

This list is probably incomplete. If you’ve used another workaround in the past, add it to this document by using the “Edit on GitHub” button at the bottom.

  • ts-node: By having both a gatsby-config.js and gatsby-config.ts (where gatsby-config.js registers ts-node) you were able to use TypeScript. You’ll need to remove the gatsby-config.js file, ts-node dependency, and address any of the current limitations. When both a gatsby-config.js and gatsby-config.ts exist the .ts file will now always take precedence.

Notable bugfixes & improvements

  • gatsby
    • Cache date formatting in LMDB cache for speed improvements, via PR #34834
    • Batch page dependency actions for speed improvements, via PR #34856

Contributors

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

Edit this page on GitHub
© 2022 Gatsby, Inc.