Vercel Build Cache for Hugo

Hi all,

I’m currently developing a site in Hugo and deploying via GitHub to Vercel.
Today I wanted to enable the image processor within Hugo.
This seems to work fine both locally and on Vercel.

However it seems Vercel is not using Hugo’s resources folder as a cache.
I was reading this page: Troubleshooting Build Errors
Is it correct to assume since Hugo is not listed there that this is correct?

If so is there any way to instruct Vercel to still cache the resources folder since this is wasting both my time but more importantly Vercel’s workers. Since now builds take 40 seconds (I know not a lot) but locally with the resources folder updates are generated within milliseconds.

I searched all docs and tried to see if there was a way within the vercel.json but came up blank.

Kind regards,
Glenn

same issue for me too. did you find a solution?
the only solution i found was to commit the “resources/_gen” directory to git

I was not able to find a solution within Vercel and would have hoped that someone from Vercel saw this thread and did something with it. But I gave up on that one.

For me the option to commit the entire resources folder to git won’t be an option since that would increase the repo size by 5x

Thanks for the update. Are you still using Vercel for Hugo builds then?

Hope Vercel implements caching for Hugo and does not treat it as a second hand citizen. :sweat_smile:

1 Like

Yeah i’m still using Vercel for that site, and try to live with the build times. The problem is the more content I add the slower it gets. And then probably at some point I will migrate it when the build times are unreasonable.

1 Like