---
title: What can I do when I run into build output limits with Next.js on Vercel?
description: Learn how to work with build output limits for Next.js on Vercel.
url: "https://vercel.com/kb/guide/what-can-i-do-when-i-run-into-build-output-limits-with-next-js-on-vercel"
published: 2025-11-03
last_updated: 2025-11-10
authors: Allen Hai
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

You might have learned about [Next.js' static data-fetching properties](https://nextjs.org/docs/basic-features/data-fetching/get-static-props) and immediately proceeded to create a new static site that reads from [CMS](https://vercel.com/docs/solutions/cms) entries.

For larger sites, you may have run into a [limit](https://vercel.com/docs/platform/limits#files) that mentioned exceeding the maximum number of build outputs. Read on to learn how you can work within the constraints of platform limitations.

## Fallback Pages

If you have a large number of pages that need to get generated (more than 1000), it's worth considering the option of rendering a fallback page and lazily building pages on-demand as they are requested.

This will not only minimize the number of initial build outputs, but it can also significantly speed up your builds. In your `getStaticPaths` function, you can add `fallback: true` to the returned object as shown below:

```javascript
export async function getStaticPaths() {
  return {
    paths: [
      { params: { ... } } 
    ],
    fallback: true or false 
  };
}
```

Enabling the fallback option will initially show your site visitors a loading state that you can customize while rendering your page in the background. Once the page is rendered, it will be persisted and cached for all your future visitors.

You might be concerned that this may negatively impact your SEO, but modern search engines are sophisticated enough to understand JavaScript and are able to crawl the content accordingly. If you prefer to delay the entire response until your page has been fully rendered, you can use the blocking option by returning `fallback: 'blocking'` instead of `fallback: true`.

## Related Documentation

- [Next.js](/docs/frameworks/full-stack/nextjs)

## More Next.js guides

- [How to revalidate Sitecore pages on publish with Next.js](/kb/guide/update-sitecore-content-manually): Learn how to use a Sitecore Experience Edge webhook and Next.js revalidatePath to refresh cached Sitecore Content SDK pages after each publish.
- [Sitemap lastmod should track content, not deployments](/kb/guide/correct-lastmod-nextjs-sitemap): Set accurate sitemap lastmod dates in Next.js using stored content timestamps, targeted revalidation, and checks that distinguish content changes from builds.
- [Optimize CSS output after moving Next.js from webpack to Turbopack](/kb/guide/optimize-turbopack-css): Diagnose larger CSS after moving Next.js to Turbopack. Use the agent skill to compare route-level output, identify causes, and test targeted fixes.