Updating Gatsby Website to Version 3
Today Gatsby v3.0 was announced today at GatsbyConf 2021 and, of course, I couldn’t wait to get my hands on it.
I’ve followed this helpful guide from the Gatsby folks and everything just worked out of the box (granted, with some cli warning), and here is some of my takeaways:
Updating package.json
First I’ve ran npm install gatsby@latest
command to update gatsby to the latest version. Once that finished, I’ve checked the outdated packages by running
npm outdated
Then I’ve upgraded the remaining packages with the following command:
yarn upgrade-interactive --latest
With the above command I get an overview of packages where I can select to upgrade them to latest.
Once everything was upgraded, I’ve ran yarn start
and just like magic, the site was working, and it was working fast!
Other Updates
At this point everything works and it’s very performant, but I still have to update other components that uses Gatsby’s first-party plugins, such as the new Gatsby Image.
All in all, the upgrade will give your Gatsby website and a great speed boost without too much hustle. Worth it!