WebPack cache file exceed file size limits when deploying NextJS app on CloudFlare Pages

1.4k Views Asked by At

I am trying to deploy my NextJS app on CloudFlare Pages. However I get an error during building application process: Error: Asset ".next/cache/webpack/client-production/0.pack" is over the 25MiB limit. Size: 38331968 bytes

Here is my deployment setting:

Build command: 
next build

Build output directory: 
/.next

Root directory: 
/

Environment variables: 
None

CloudFlare Pages has a limitation of 25MB per file and the file above exceed that limitation. I don't know what this file is for. Is there a way to reduce its size (or just delete it) ?

0

There are 0 best solutions below