v3.7 Release Notes
firstname.lastname@example.org release (June 2021 #1)
Key highlights of this release:
- Functions - Now generally available
- webpack caching - Starting gradual rollout
- Yarn 2 (PNP) support
- New API for source plugins:
- Experimental: Node persistence in LMDB - Lower peak memory usage
gatsby-remark-images: async image decoding by default
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.
If you’ve been using it as an experimental feature for a while, you no longer need to include the experimental
FUNCTIONS flag to use it after this update.
webpack 5 introduced built-in persistent caching. It allows webpack to reuse results of previous compilations and significantly speed up compilation steps.
We’ve added this feature in 3.4 release behind a flag. Now we are starting a gradual rollout for everyone. This release enables it for 20% of users.
If you encounter any issues, please let us know in the umbrella discussion.
This new API will be used to write out information that ties the state of some CMS content to a finally built page. Useful for routing to previews or even production content once they’re built.
This release adds a new public action
unstable_createNodeManifest which is used to tie a manifest ID
(a CMS id that maps to a unique revision state of some content) to a page that was built from a specific node.
To make the mapping from node to page more accurate, this release introduces a new argument to the
ownerNodeId so that a user can specify that a page is owned by a specific node.
In the case that no
ownerNodeId is provided, the logic checks for a page with an
id variable in page context that
matches to the node id of the node manifest. If neither of those exist the logic maps the manifest to the first
page the node is found on in query tracking.
The result is that a source plugin can allow a CMS to create a manifest file using a CMS ID that maps to a finally built page in Gatsby, allowing for a service to redirect to the right page after a build is complete.
This release introduces a new experimental data storage option: LMDB (via the excellent lmdb-store package).
Instead of keeping nodes in memory (as it’s in Redux), they are instantly saved to this persistent embeddable storage. This will be beneficial for larger sites that can run into OOMs when persisting redux state to disk. Several other performance improvements using this new data store will follow.
We encourage you to try it and let us know if you encounter any issues!
Installation instructions are in the Umbrella Discussion.
Added new plugin option
decoding that adds corresponding attribute to all
img tags produced by the plugin.
Default value is
async (other allowed values are:
decoding property allows you to control if the browser is allowed to try to parallelize loading your image.
If doing so would cause problems, you can specify
sync to disable asynchronous loading.
Yarn 2 with Plug’n’Play (Pnp) is available again. With the upgrade of Webpack v4-v5 during our Gatsby v3 release, PnP support broke. We’ve added an e2e-test to make sure this won’t happen again in the future. With yarn 2, you’ll notice faster NPM installs and less data usage as yarn2 is aggresivily caching node_modules.
- Better detection of Babel rules for HMR when customizing the webpack config, via PR #31477
- Correct config for svgo plugins, via PR #31620
Maximum call stack size exceedederror, via PR #31547
gatsby-source-contentful: Fix blinking progress bar, via PR #31467
gatsby-source-wordpress: Prevent “EADDRINUSE: address already in use 127.0.0.1” error, via PR #31710
gatsby-remark-katext: Fix compatibility with remark 13, via PR #31596
A big Thank You to our community who contributed to this release 💜