Next.js Discord

Discord Forum

.next package rly big if not using vercel server. Some suggestions how flux cache?

Unanswered
Argentine ant posted this in #help-forum
Open in Discord
Avatar
Argentine antOP
I understand about cronjob with build, but something better? may be some configuration in nextConfig? thanks 🙂

10 Replies

Avatar
Argentine antOP
someone help?
Avatar
@Argentine ant someone help?
Avatar
Dunker
can you explain a bit more
.next package rly big if not using vercel server ?
.next folder is big at other hosting providers, or sth different
Avatar
@Dunker can you explain a bit more
Avatar
Argentine antOP
Yes, certainly! When I connected to my server, I noticed that the .next folder was around 2GB in size, and I suspect it could become even larger over time. I believe this size increase might be due to the revalidate fetch feature in my project, which is fetching data without utilizing a "flux" mechanism. When hosting on Vercel, this issue seems to be handled efficiently, but on my current server, it's a concern. Despite checking the Next.js configuration settings, I didn’t find any relevant options in next.config.js that could potentially address this issue. I'd appreciate any recommendations or insights on how to better manage caching and reduce the size of the .next folder, especially any configurations that might be helpful in next.config.js. Thank you!
Avatar
@Argentine ant VPS 2) i cant, i use next build, and next start with .env.local set 3) its problem production not install or cache in node modules, problem in .next folder cache
Avatar
for 3, oldcoder wants you to remove all existing cache to see if it is keeping more than necessary (and those folders can cache lots)
Avatar
@risky for 3, oldcoder wants you to remove all existing cache to see if it is keeping more than necessary (and those folders can cache lots)
Avatar
Dunker
Yeah sometimes we re caching a lot before deploying and rebuilding many times