Next.js Discord

Discord Forum

Production - size of .next/server folder

Unanswered
Californian posted this in #help-forum
Open in Discord
Avatar
CalifornianOP
Hello, we have deploy problem of frontend app written in NextJs

Front is on aws aws amplify and on our type of deploy is set 200 ma max size of file.
Should i change type of deploy to handle more max size or optymalize .next folder to not have above 250 mb ? Because ./next/server has 230 mb after build so maybe our next config is not good for production build

9 Replies

Avatar
you could try deploying the standalone version
Avatar
CalifornianOP
i will see diffrences after build loccaly ?
Avatar
CalifornianOP
hmmm, after standalone version the size increased
Avatar
^hmm
without standalone
can u try looking for what files are responsible for such a high out size?
Avatar
CalifornianOP
without standalone:
- cache 661 mb
- server 235 mb
- ....others

full .next folder: 935 mb
Avatar
CalifornianOP
hmmm, any idea ?