'.next folder size increases in Next react App

We have developed the nextjs react application, which is ready in production now. It leads to some storage issues. we inspect a lot and finally found .next folder size increases while we navigate to some pages. For example, the .next folder size was too small for the initial build, like 6.4Mb. After some page route happens, it will be like 256Mb.

can someone explain the cause of this issue?

How to fix this storage issue?

Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source