This site runs best with JavaScript enabled.

How to speed up gatsby site deployment on Netlify

Photo by Erik Brolin

How to speed up gatsby site deployment on Netlify

This weekend, I forked repository and made my personal website. This site used Gatsby and deploy to Netlify so I will do the same.

After 1 day to remove un-necessary things. I'm already to deploy my website to Netlify. The configuration just place in simple file netlify.toml

2 for = "/rss.xml"
3 [headers.values]
4 Access-Control-Allow-Origin = "*"
7 package = "netlify-plugin-gatsby-cache"
10 command = "npm run netlify"
11 functions = "public/functions/"

What is the netlify-plugin-gatsby-cache plugin? The answer from Jason Lengstorfl is "Persist the Gatsby cache between Netlify builds for huge build speed improvements! ⚡️"

This is the Repo. In there, we can get very detailed about how to install.

Basically, We have 2 ways to install plugin on your application:

2 publish = "public"
5 package = "netlify-plugin-gatsby-cache"

Next, We continue look and see what is the npm run netlify do? This is a shortcut of gatsby-parallel-runner. After spent 8 hours to setup Google Cloud Function that can use to run parallel gatsby images but I was fail.

And the article that help my life from Netlify is Gatsby Build Speed Improvements With Parallel Image Processing Follow step by step on the local development. I deployed success Google Cloud Function that can help speed up processing images.

Deploy google function no error

Discuss on TwitterEdit post on GitHub

Share article
Kent C. Dodds

Kent C. Dodds is a JavaScript software engineer and teacher. He's taught hundreds of thousands of people how to make the world a better place with quality software development tools and practices. He lives with his wife and four kids in Utah.