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.
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 agatsby-config.jsandgatsby-config.ts(wheregatsby-config.jsregistersts-node) you were able to use TypeScript. You’ll need to remove thegatsby-config.jsfile,ts-nodedependency, and address any of the current limitations. When both agatsby-config.jsandgatsby-config.tsexist the.tsfile will now always take precedence.
Notable bugfixes & improvements
gatsby
Contributors
A big Thank You to our community who contributed to this release 💜