Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Netlify Docs

See what shipped at NTL DEPLOY.Try the new AI workflow →

Next.js on Netlify

Netlify Next.js adapter v5 test status

Netlify supports all major Next.js features with zero configuration.

Under the hood, this is powered by our OpenNext adapter, which we maintain in the open and test alongside every stable release of Next.js.

If you have an existing Next.js app you’d like to deploy, push your code to a Git provider and connect it through the Netlify Dashboard.

When starting from scratch, the fastest way is to deploy ourNext.js platform starter template to your Netlify account.

Deploy to Netlify

  • App Router: Netlify fully supports the Next.js App Router, which supports more powerful nested layouts and React’s latest features, such as Server Components and Streaming.

  • Automatic fine-grained caching: the adapter uses ourfine-grained caching primitives to support the Next.js Full Route Cache and Data Cache. This means that static page responses are automatically cached at the edge and can be revalidated by path or by tag.

  • On-demand and time-based revalidation: both the App Router and Pages Router support on-demand and time-based revalidation, allowing you to revalidate and regenerate content at any time after a deploy.

  • Image optimization: thenext/image component usesNetlify Image CDN by default, to ensure your images are optimized and served in the most efficient format.

The following tables show you a comprehensive mapping of critical Next.js features and how Netlify supports them. Netlify supports new Next.js features as early as possible, but experimental features may not be fully stable yet.

Next.js FeatureSupportNotes
App RouterFull Support
Server-Side Rendering (SSR)Full Support
Incremental Static Regeneration (ISR)Full Support
Static Site Generation (SSG)Full Support.
Pre-rendered pages are stored in Next.js route cache, and fetched from the route cache by a function invocation when first accessed after a deploy.
React Server ComponentsFull Support
Server ActionsFull Support
Response StreamingFull Support
asynchronous work withnext/afterFull Support.
Learn more in theAPI reference.
MiddlewareFull support.
Implemented automatically viaEdge Functions. Learn aboutlimitations.
Route HandlersFull Support
Image OptimizationFull Support
Redirects and rewritesFull Support
InternationalizationFull Support
Draft ModeFull Support
Experimental framework featuresPartial SupportPartial Prerendering (PPR): supported.
Use cache: supported.
Node.js in Middleware: not supported yet.

Netlify automatically configures your site to support modern Next.js features out of the box. This is powered by our OpenNext adapter, an open source project that provisions the correct infrastructure for each part of your Next.js application without custom configuration.

We recommend that you don’t pin the adapter version. We actively maintain the adapter to support all Next.js versions starting from version 13.5 and, if you don’t pin the version, we will automatically update the adapter to the latest version on each site build for you.

When you deploy a Next.js project on Netlify, the adapter automatically:

  • Provisions Netlify Functions for:

    • Server-Side Rendering (SSR)
    • Incremental Static Regeneration (ISR)
    • Partial Prerendering (PPR)
    • API routes
    • Server Actions
  • Provisions Netlify Edge Functions for:

    • Next.js Middleware
    • Geolocation- and routing-based personalization
    • Fast execution at the network edge
  • Configures caching and revalidation with:

    • Next.js Full Route Cache and Data Cache
    • Tag-based or path-based revalidation
  • Enables image optimization with the Netlify Image CDN andnext/image

We verify compatibility with every new stable version of Next.js. Each release of the adapter is tested using:

•Our official end-to-end test suite•Additional integration tests with Netlify’s platform•Real-world deploys using a public starter template

We recommend that you don’t pin the adapter version. We actively maintain the adapter to support all Next.js versions starting from version 13.5 and, if you don’t pin the version, we will automatically use the latest version on each site build for you.

To pin a specific version of the adapter:

  1. Install the version you want inpackage.json:

    Terminal window
    npminstall@netlify/plugin-nextjs@<version>
  2. Add the plugin to yournetlify.toml:

    [[plugins]]
    package ="@netlify/plugin-nextjs"

You’ll be opting out of automatic updates and newer architecture improvements maintained through OpenNext. To opt back in, remove@netlify/plugin-nextjs from yourpackage.json.

Open issues are documented in theend-to-end test report page.

  • Edge Runtime Location: SSR pages using the edge runtime run in your functions region rather than true edge locations
  • Rewrite Limitations: Rewrites in Next.js configuration can’t point to static files in the public directory.
  • Middleware Execution Order: Headers and redirects are evaluated after middleware, differing from stand-alone Next.js behavior.
  • Node.js Middleware:
  • Forms Integration: Netlify Forms requires a specific workaround when used with Next.js applications.Learn more.

Did you find this doc useful?

Your feedback helps us improve our docs.


[8]
ページ先頭

©2009-2025 Movatter.jp