Next.js uses a local cache directory to optimise the performance of the local development server. I have a project where this directory uses 2.7 GB of disk space, which I consider quite high, given my disk space constraints.
I looked through the documentation to figure out if there's a way to limit how much space it uses, but couldn't find anything. There is an article on setting up caching in CI envirnoments and a file with description of every config allowed by next.config.js, but nothing in there regarding the local cache directory and limiting its size.
I mostly run the local app using a dev server with next dev command. I rarely use a local build with next build and I'm comfortable with manually clearing some cache after using next build, if needed.
Is it possible to limit the size of the cache directory? How can I do that?
Here's the disk space usage of my .next directory given by dust:

I don't really know how the caching works. Does it include all the compiled code, including packages from node_modules? Is this a problem with my application being so large? Perhaps I should be looking to reduce that instead?
I use yarn v3 for package management, without plug-n-play. Is there something in my package manager setup that I can do to help reduce disk space usage of the next cache directory?
