'reduce the size of output of nextjs production build

I have a project with next js and I used yarn build for build, then the build size of my project has reached 500 MB. Is there a way to reduce its size? Thank you for your help.



Sources

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

Source: Stack Overflow

Solution Source