v3.4 Release Notes
Welcome to gatsby@3.4.0
release (April 2021 #2)
Key highlights of this release:
- Experimental: Enable webpack persistent caching for production builds - significantly speed up webpack compilation on subsequent builds
- Experimental: Gatsby Functions - serverless functions in Gatsby & Gatsby Cloud
- New Aggregation Resolvers - adds
min()
,max()
, andsum()
resolvers toallX
queries - Better Fast Refresh handling for styling libraries - Theme UI and Chakra UI now work correctly with Fast Refresh
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.
Experimental: Enable webpack persistent caching for production builds
webpack 5 introduced built in persistent caching. It allows webpack to reuse result of previous compilations and significantly speed up compilation steps.
To use it, add a flag to your gatsby-config.js
:
Experimental: Functions
We’re making our initial alpha release of serverless functions in Gatsby!
New Aggregation Resolvers
The PR #30789 added new aggregation resolvers similar to the already existing group
and distinct
resolvers. You now can use min()
, max()
, and sum()
. They support numeric fields, but also attempt to cast non-numeric fields and includes them if the value is not NaN
.
An example query:
Better Fast Refresh handling for styling libraries
Since the introduction of Fast Refresh changes to theme files both in Theme UI and Chakra UI didn’t result in correct hot-reloading behavior as the user had to manually reload the page to see their changes. The PR #30901 added better Fast Refresh handling for components that don’t satisfy the constraints set by Fast Refresh but it didn’t completely fix the incorrect behavior in both plugins. Upstream PRs from us to Theme UI and Chakra UI fixed the behavior! Install theme-ui@^0.7.1
or @chakra-ui/gatsby-plugin@^2.0.0
to get the updates.
Notable bugfixes & improvements
- Fixed page context changes not triggering query rerunning PR #28590
- Fixed not being able to disable
DEV_SSR
flag whenFAST_DEV
is enabled PR #30992 - Speed up
createPages
by ~10% by memoizingprocess.env
access PR #30768 - You now can define the
--host
option ofgatsby-cli
withenv.HOST
PR #26712 - Allow CI AWS lamba builds PR #30653
- File System Route API: De-dupe collection pages PR #31016
Contributors
A big Thank You to our community who contributed to this release 💜
gustavo-a: fix(gatsby-source-wordpress): change
console.warning
toconsole.warn
PR #30764NatnaelSisay: Fix: change attribute name PR #30800
evildmp: chore(docs): Update links to Diátaxis framework PR #30808
hoobdeebla: fix(renovate): add breaking minor updates to major updates list PR #30676
herecydev: fix(gatsby): Decode base path in runtime PR #30682
- Refactor: using-contentful to use gatsby-plugin-image exclusively PR #30717
- feat(contentful): warn users when using restricted content type names PR #30715
- test: introduce e2e tests for Contentful PR #30390
- test: Add Contentful content rendering to E2E tests PR #30854
- test(contentful): improve content reference snapshot tests PR #31008
kaboumk: fix(gatsby-starter-wordpress-blog): Fix altText PR #30832
johndavidcooley: chore(docs): Fix typo PR #30858
AbdallahAbis: chore(gatsby-plugin-image): Remove version note PR #30758
pvorozhe: chore: Add cloud hosting option for starter READMEs PR #30792
pelleknaap: Fix small typo PR #30911
mgurevin: fix(gatsby-cli): added HOST environment variable PR #26712
VMBindraban: chore(gatsby-source-graphql): Update README url => uri PR #30872
OdysLam: chore(docs): Add tailwind to more options at tutorial part 2 PR #30910
moonmeister: breaking(gatsby-plugin-sitemap): vNext rewrite PR #25670
AcademicHumber: Change the ‘idKey’ parameter’s default value PR #30502
kennethormandy: chore(gatsby-plugin-mdx): Document CommonMark option PR #30669
mathisobadia: fix(gatsby): change order of feedbackDisabled checks to allow CI AWS lambda build PR #30653
MichaelDeBoey: chore(gatsby-plugin-flow): Add pluginOptionsSchema validation PR #27599
chrish-d: chore(docs): Updated warning icon to use emoji PR #30979
jcalcaben: fix(gatsby-plugin-mdx): Reference style links broken in static builds PR #30967