Support for Yarn 2 (berry) caching (like node_modules is)

I’m seeing at the moment, that the build process isn’t caching the .yarn folder and it doesn’t seem to be listed in run-build-functions.sh for caching. This means that it is unplugging and building binaries every time, increasing build time.

Also, if a user isn’t checking in their .yarn/cache/ (since it’s optional), it’s going to be fetching dependencies every time. Which would be more time on build.

Are there any plans to support caching .yarn like node_modules is?

https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored

Hi, @keirwilliams, welcome to the Netlify community site and you make a great point.

The repo netlify/build-image is a public, open source repo and we do encourage input there. Would you be willing to file an issue there asking for this?

In fact, if you wanted to make a PR we sometimes merge those from people outside of Netlify (after review of course). In both cases though, please only do this if you want to. :+1: