next

  • Version 16.0.1
  • Published
  • 140 MB
  • 5 dependencies
  • MIT license

Install

npm i next
yarn add next
pnpm add next

Overview

The React Framework

Index

Functions

Interfaces

Type Aliases

Namespaces

Functions

function createServer

createServer: (
options: NextServerOptions & NextBundlerOptions
) => NextWrapperServer;

    Interfaces

    interface AdapterOutput

    interface AdapterOutput {}

      property APP_PAGE

      APP_PAGE: SharedRouteFields & {
      type: AdapterOutputType.APP_PAGE;
      };
      • APP_PAGE represents all the React pages that are under app/ with the filename of page.{j,t}s{,x}.

      property APP_ROUTE

      APP_ROUTE: SharedRouteFields & {
      type: AdapterOutputType.APP_ROUTE;
      };
      • APP_ROUTE represents all the API routes and metadata routes that are under app/ with the filename of route.{j,t}s{,x}.

      property MIDDLEWARE

      MIDDLEWARE: SharedRouteFields & {
      type: AdapterOutputType.MIDDLEWARE;
      /**
      * config related to the route
      */
      config: SharedRouteFields['config'] & {
      /**
      * matchers are the configured matchers for middleware
      */
      matchers?: Array<{
      source: string;
      sourceRegex: string;
      has: RouteHas[] | undefined;
      missing: RouteHas[] | undefined;
      }>;
      };
      };
      • MIDDLEWARE represents the middleware output if present

      property PAGES

      PAGES: SharedRouteFields & {
      type: AdapterOutputType.PAGES;
      };
      • PAGES represents all the React pages that are under pages/.

      property PAGES_API

      PAGES_API: SharedRouteFields & {
      type: AdapterOutputType.PAGES_API;
      };
      • PAGES_API represents all the API routes under pages/api/.

      property PRERENDER

      PRERENDER: {
      id: string;
      pathname: string;
      type: AdapterOutputType.PRERENDER;
      /**
      * For prerenders the parent output is the originating
      * page that the prerender is created from
      */
      parentOutputId: string;
      /**
      * groupId is the identifier for a group of prerenders that should be
      * revalidated together
      */
      groupId: number;
      pprChain?: {
      headers: Record<string, string>;
      };
      /**
      * parentFallbackMode signals whether additional routes can be generated
      * e.g. fallback: false or 'blocking' in getStaticPaths in pages router
      */
      parentFallbackMode?: DynamicPrerenderManifestRoute['fallback'];
      /**
      * fallback is initial cache data generated during build for a prerender
      */
      fallback?: {
      /**
      * path to the fallback file can be HTML/JSON/RSC
      */
      filePath: string;
      /**
      * initialStatus is the status code that should be applied
      * when serving the fallback
      */
      initialStatus?: number;
      /**
      * initialHeaders are the headers that should be sent when
      * serving the fallback
      */
      initialHeaders?: Record<string, string | string[]>;
      /**
      * initial expiration is how long until the fallback entry
      * is considered expired and no longer valid to serve
      */
      initialExpiration?: number;
      /**
      * initial revalidate is how long until the fallback is
      * considered stale and should be revalidated
      */
      initialRevalidate?: Revalidate;
      /**
      * postponedState is the PPR state when it postponed and is used for resuming
      */
      postponedState?: string;
      };
      /**
      * config related to the route
      */
      config: {
      /**
      * allowQuery is the allowed query values to be passed
      * to an ISR function and what should be considered for the cacheKey
      * e.g. for /blog/[slug], "slug" is the only allowQuery
      */
      allowQuery?: string[];
      /**
      * allowHeader is the allowed headers to be passed to an
      * ISR function to prevent accidentally poisoning the cache
      * from leaking additional information that can impact the render
      */
      allowHeader?: string[];
      /**
      * bypass for is a list of has conditions the cache
      * should be bypassed and invoked directly e.g. action header
      */
      bypassFor?: RouteHas[];
      /**
      * renderingMode signals PPR or not for a prerender
      */
      renderingMode?: RenderingMode;
      /**
      * bypassToken is the generated token that signals a prerender cache
      * should be bypassed
      */
      bypassToken?: string;
      };
      };
      • PRERENDER represents an ISR enabled route that might have a seeded cache entry or fallback generated during build

      property STATIC_FILE

      STATIC_FILE: {
      id: string;
      filePath: string;
      pathname: string;
      type: AdapterOutputType.STATIC_FILE;
      };
      • STATIC_FILE represents a static file (ie /_next/static) or a purely static HTML asset e.g. an automatically statically optimized page that does not use ISR

      interface Metadata

      interface Metadata extends DeprecatedMetadataFields {}
      • Metadata interface to describe all the metadata fields that can be set in a document.

        Remarks

        This interface covers all the metadata fields available in Next.js including title, description, icons, openGraph, twitter, and more. Fields such as metadataBase help in composing absolute URLs from relative ones. The title field supports both simple strings and a template object with default, template, and absolute properties.

        Example 1

        // Static metadata export in a layout or page:
        import type { Metadata } from 'next'
        export const metadata: Metadata = {
        metadataBase: new URL('https://example.com'),
        title: { default: 'My Site', template: '%s | My Site' },
        description: 'Welcome to My Site',
        alternates: {
        canonical: 'https://example.com',
        languages: {
        'en-US': 'https://example.com/en-US',
        'de-DE': 'https://example.com/de-DE'
        }
        },
        openGraph: {
        title: 'My Site',
        description: 'Welcome to My Site',
        url: 'https://example.com',
        siteName: 'My Site',
        images: [{ url: 'https://example.com/og.png' }]
        },
        }

      property abstract

      abstract?: null | string | undefined;
      • A brief description of the web page.

        Remarks

        Rendered as the abstract meta tag. This is *not recommended* as it is superseded by description.

        Example 1

        abstract: "My Website Description"
        // Renders <meta name="abstract" content="My Website Description" />

      property alternates

      alternates?: null | AlternateURLs | undefined;
      • The canonical and alternate URLs for the document.

        Remarks

        This field allows defining a canonical URL as well as alternate URLs (such as for multiple languages).

        Example 1

        alternates: {
        canonical: "https://example.com",
        languages: {
        "en-US": "https://example.com/en-US"
        }
        }

      property appleWebApp

      appleWebApp?: null | boolean | AppleWebApp | undefined;
      • The Apple web app metadata for the document.

        Example 1

        appleWebApp: { capable: true, title: "My Website", statusBarStyle: "black-translucent" }

        See Also

        • https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

      property applicationName

      applicationName?: null | string | undefined;
      • The application name.

        Example 1

        applicationName: "My Blog"
        // Renders: <meta name="application-name" content="My Blog" />
      appLinks?: null | AppLinks | undefined;
      • The Facebook AppLinks metadata for the document.

        Example 1

        appLinks: {
        ios: { appStoreId: "123456789", url: "https://example.com" },
        android: { packageName: "com.example", url: "https://example.com" }
        }
        // Renders
        <meta property="al:ios:app_store_id" content="123456789" />
        <meta property="al:ios:url" content="https://example.com" />
        <meta property="al:android:package" content="com.example" />
        <meta property="al:android:url" content="https://example.com" />

      property archives

      archives?: null | string | Array<string> | undefined;
      • The archives link rel property.

        Example 1

        archives: "https://example.com/archives"
        // Renders <link rel="archives" href="https://example.com/archives" />

      property assets

      assets?: null | string | Array<string> | undefined;
      • The assets link rel property.

        Example 1

        assets: "https://example.com/assets"
        // Renders <link rel="assets" href="https://example.com/assets" />

      property authors

      authors?: null | Author | Array<Author> | undefined;
      • The authors of the document.

        Example 1

        authors: [{ name: "Next.js Team", url: "https://nextjs.org" }]
        // Renders:
        // <meta name="author" content="Next.js Team" />
        // <link rel="author" href="https://nextjs.org" />

      property bookmarks

      bookmarks?: null | string | Array<string> | undefined;
      • The bookmarks link rel property.

        Remarks

        Although technically against the HTML spec, this is used in practice.

        Example 1

        bookmarks: "https://example.com/bookmarks"
        // Renders <link rel="bookmarks" href="https://example.com/bookmarks" />

      property category

      category?: null | string | undefined;
      • The category meta name property.

        Example 1

        category: "My Category"
        // Renders <meta name="category" content="My Category" />

      property classification

      classification?: null | string | undefined;
      • The classification meta name property.

        Example 1

        classification: "My Classification"
        // Renders <meta name="classification" content="My Classification" />

      property colorScheme

      colorScheme?: null | ColorSchemeEnum | undefined;
      • The color scheme for the document.

        Deprecated

        Use the new viewport configuration (export const viewport: Viewport = { ... }) instead.

      property creator

      creator?: null | string | undefined;
      • The creator of the document.

        Example 1

        creator: "Next.js Team"
        // Renders: <meta name="creator" content="Next.js Team" />

      property description

      description?: null | string | undefined;
      • The document description, and optionally the Open Graph and Twitter descriptions.

        Example 1

        description: "My Blog Description"
        // Renders: <meta name="description" content="My Blog Description" />

      property facebook

      facebook?: null | Facebook | undefined;
      • The Facebook metadata for the document.

        Remarks

        Specify either appId or admins (but not both) to configure Facebook integration.

        Example 1

        facebook: { appId: "12345678" }
        // Renders <meta property="fb:app_id" content="12345678" />
        // or
        facebook: { admins: ["12345678"] }
        // Renders <meta property="fb:admins" content="12345678" />

      property formatDetection

      formatDetection?: null | FormatDetection | undefined;
      • Indicates whether devices should interpret certain formats (such as telephone numbers) as actionable links.

        Example 1

        formatDetection: { telephone: false }
        // Renders: <meta name="format-detection" content="telephone=no" />

      property generator

      generator?: null | string | undefined;
      • The generator used for the document.

        Example 1

        generator: "Next.js"
        // Renders: <meta name="generator" content="Next.js" />

      property icons

      icons?: null | IconURL | Array<Icon> | Icons | undefined;
      • The icons for the document. Defaults to rel="icon".

        Remarks

        You can specify a simple URL or an object to differentiate between icon types (e.g., apple-touch-icon).

        Example 1

        icons: "https://example.com/icon.png"
        // or
        icons: {
        icon: "https://example.com/icon.png",
        apple: "https://example.com/apple-icon.png"
        }

        See Also

        • https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-icon

      property itunes

      itunes?: null | ItunesApp | undefined;
      • The metadata for the iTunes App.

        Remarks

        Adds the name="apple-itunes-app" meta tag.

        Example 1

        itunes: { app: { id: "123456789", affiliateData: "123456789", appArguments: "123456789" } }
        // Renders <meta name="apple-itunes-app" content="app-id=123456789, affiliate-data=123456789, app-arguments=123456789" />

      property keywords

      keywords?: null | string | Array<string> | undefined;
      • The keywords for the document.

        Remarks

        When an array is provided, keywords are flattened into a comma-separated string.

        Example 1

        keywords: "nextjs, react, blog"
        // or
        keywords: ["react", "server components"]

      property manifest

      manifest?: null | string | URL | undefined;
      • A web application manifest, as defined in the Web Application Manifest specification.

        Example 1

        manifest: "https://example.com/manifest.json"
        // Renders: <link rel="manifest" href="https://example.com/manifest.json" />

        See Also

        • https://developer.mozilla.org/docs/Web/Manifest

      property metadataBase

      metadataBase?: null | string | URL | undefined;
      • The base path and origin for absolute URLs in various metadata fields.

        Remarks

        When relative URLs (for Open Graph images, alternates, etc.) are used, they are composed with this base. If not provided, Next.js will populate a default value based on environment variables.

      property openGraph

      openGraph?: null | OpenGraph | undefined;
      • The Open Graph metadata for the document.

        Remarks

        Follows the Open Graph protocol to enrich link previews.

        Example 1

        openGraph: {
        type: "website",
        url: "https://example.com",
        title: "My Website",
        description: "My Website Description",
        siteName: "My Website",
        images: [{ url: "https://example.com/og.png" }]
        }

        See Also

        • https://ogp.me/

      property other

      other?:
      | ({
      [name: string]: string | number | Array<string | number>;
      } & DeprecatedMetadataFields)
      | undefined;
      • Arbitrary name/value pairs for additional metadata.

        Remarks

        Use this field to define custom meta tags that are not directly supported.

        Example 1

        other: { custom: ["meta1", "meta2"] }

      property pagination

      pagination?: {
      previous?: null | string | URL | undefined;
      next?: null | string | URL | undefined;
      };
      • The pagination link rel properties.

        Example 1

        pagination: {
        previous: "https://example.com/items?page=1",
        next: "https://example.com/items?page=3"
        }
        // Renders
        <link rel="prev" href="https://example.com/items?page=1" />
        <link rel="next" href="https://example.com/items?page=3" />

        See Also

        • https://developers.google.com/search/blog/2011/09/pagination-with-relnext-and-relprev

      property pinterest

      pinterest?: null | Pinterest;
      • The Pinterest metadata for the document to choose whether opt out of rich pin data.

        Example 1

        pinterest: { richPin: true }
        // Renders <meta name="pinterest-rich-pin" content="true" />

      property publisher

      publisher?: null | string | undefined;
      • The publisher of the document.

        Example 1

        publisher: "Vercel"
        // Renders: <meta name="publisher" content="Vercel" />

      property referrer

      referrer?: null | ReferrerEnum | undefined;
      • The referrer setting for the document.

        Example 1

        referrer: "origin"
        // Renders: <meta name="referrer" content="origin" />

      property robots

      robots?: null | string | Robots | undefined;
      • The robots setting for the document.

        Remarks

        Can be a string (e.g., "index, follow") or an object with more granular rules.

        Example 1

        robots: "index, follow"
        // or
        robots: { index: true, follow: true }

        See Also

        • https://developer.mozilla.org/docs/Glossary/Robots.txt

      property themeColor

      themeColor?:
      | null
      | string
      | ThemeColorDescriptor
      | ThemeColorDescriptor[]
      | undefined;
      • The theme color for the document.

        Deprecated

        Use the new viewport configuration (export const viewport: Viewport = { ... }) instead.

      property title

      title?: null | string | TemplateString | undefined;
      • The document title.

        Remarks

        The title can be a simple string (e.g., "My Blog") or an object with: - default: A fallback title for child segments. - template: A title template (e.g., "%s | My Website") applied to child titles. - absolute: A title that overrides parent templates.

        Example 1

        // As a simple string:
        title: "My Blog"
        // As a template object:
        title: { default: "Dashboard", template: "%s | My Website" }
        // Using absolute value (ignores parent template):
        title: { absolute: "My Blog", template: "%s | My Website" }

      property twitter

      twitter?: null | Twitter | undefined;
      • The Twitter metadata for the document.

        Remarks

        - Used for configuring Twitter Cards and can include details such as card, site, and creator. - Notably, more sites than just Twitter (now X) use this format.

        Example 1

        twitter: {
        card: "summary_large_image",
        site: "@site",
        creator: "@creator",
        images: "https://example.com/og.png"
        }

      property verification

      verification?: Verification | undefined;
      • The common verification tokens for the document.

        Example 1

        verification: { google: "1234567890", yandex: "1234567890", "me": "1234567890" }
        // Renders <meta name="google-site-verification" content="1234567890" />
        // <meta name="yandex-verification" content="1234567890" />
        // <meta name="me" content="@me" />

      property viewport

      viewport?: null | string | ViewportLayout | undefined;
      • The viewport setting for the document.

        Deprecated

        Use the new viewport configuration (export const viewport: Viewport = { ... }) instead.

      interface NextAdapter

      interface NextAdapter {}

        property modifyConfig

        modifyConfig?: (
        config: NextConfigComplete,
        ctx: {
        phase: PHASE_TYPE;
        }
        ) => Promise<NextConfigComplete> | NextConfigComplete;
        • modifyConfig is called for any CLI command that loads the next.config to only apply for specific commands the "phase" should be used

          Parameter config

          Parameter ctx

          Returns

        property name

        name: string;

          property onBuildComplete

          onBuildComplete?: (ctx: {
          routes: {
          headers: Array<{
          source: string;
          sourceRegex: string;
          headers: Record<string, string>;
          has: RouteHas[] | undefined;
          missing: RouteHas[] | undefined;
          priority?: boolean;
          }>;
          redirects: Array<{
          source: string;
          sourceRegex: string;
          destination: string;
          statusCode: number;
          has: RouteHas[] | undefined;
          missing: RouteHas[] | undefined;
          priority?: boolean;
          }>;
          rewrites: {
          beforeFiles: RewriteItem[];
          afterFiles: RewriteItem[];
          fallback: RewriteItem[];
          };
          dynamicRoutes: Array<DynamicRouteItem>;
          };
          outputs: AdapterOutputs;
          /**
          * projectDir is the absolute directory the Next.js application is in
          */
          projectDir: string;
          /**
          * repoRoot is the absolute path of the detected root of the repo
          */
          repoRoot: string;
          /**
          * distDir is the absolute path to the dist directory
          */
          distDir: string;
          /**
          * config is the loaded next.config (has modifyConfig applied)
          */
          config: NextConfigComplete;
          /**
          * nextVersion is the current version of Next.js being used
          */
          nextVersion: string;
          /**
          * buildId is the current unique ID for the build, this can be
          * influenced by NextConfig.generateBuildId
          */
          buildId: string;
          }) => Promise<void> | void;

            interface NextApiRequest

            interface NextApiRequest extends IncomingMessage {}
            • Next API route request

            property body

            body: any;

              property cookies

              cookies: Partial<{
              [key: string]: string;
              }>;
              • Object of cookies from header

              property draftMode

              draftMode?: boolean;

                property env

                env: Env;

                  property preview

                  preview?: boolean;

                    property previewData

                    previewData?: PreviewData;
                    • Preview data set on the request, if any

                    property query

                    query: Partial<{
                    [key: string]: string | string[];
                    }>;
                    • Object of query values from url

                    interface NextConfig

                    interface NextConfig {}
                    • Next.js can be configured through a next.config.js file in the root of your project directory.

                      This can change the behavior, enable experimental features, and configure other advanced options.

                      Read more: [Next.js Docs: next.config.js](https://nextjs.org/docs/app/api-reference/config/next-config-js)

                    property allowedDevOrigins

                    allowedDevOrigins?: string[];

                      property assetPrefix

                      assetPrefix?: string;
                      • To set up a CDN, you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on.

                        See Also

                        • [CDN Support with Asset Prefix](https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix)

                      property basePath

                      basePath?: string;
                      • Deploy a Next.js application under a sub-path of a domain

                        See Also

                        • [Base path configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)

                      property bundlePagesRouterDependencies

                      bundlePagesRouterDependencies?: boolean;
                      • Enables the bundling of node_modules packages (externals) for pages server-side bundles.

                        See Also

                        • https://nextjs.org/docs/pages/api-reference/next-config-js/bundlePagesRouterDependencies

                      property cacheComponents

                      cacheComponents?: boolean;
                      • When enabled, in development and build, Next.js will automatically cache page-level components and functions for faster builds and rendering. This includes Partial Prerendering support.

                        See Also

                        • [Cache Components documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheComponents)

                      property cacheHandler

                      cacheHandler?: string | undefined;
                      • The default cache handler for the Pages and App Router uses the filesystem cache. This requires no configuration, however, you can customize the cache handler if you prefer.

                        See Also

                        • [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching) and the [API Reference](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath).

                      property cacheHandlers

                      cacheHandlers?: {
                      default?: string;
                      remote?: string;
                      static?: string;
                      [handlerName: string]: string | undefined;
                      };

                        property cacheLife

                        cacheLife?: {
                        [profile: string]: {
                        stale?: number;
                        revalidate?: number;
                        expire?: number;
                        };
                        };

                          property cacheMaxMemorySize

                          cacheMaxMemorySize?: number;
                          • Configure the in-memory cache size in bytes. Defaults to 50 MB. If cacheMaxMemorySize: 0, this disables in-memory caching entirely.

                            See Also

                            • [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching).

                          property cleanDistDir

                          cleanDistDir?: boolean;
                          • The build output directory (defaults to .next) is now cleared by default except for the Next.js caches.

                          property compiler

                          compiler?: {
                          reactRemoveProperties?:
                          | boolean
                          | {
                          properties?: string[];
                          };
                          relay?: {
                          src: string;
                          artifactDirectory?: string;
                          language?: 'typescript' | 'javascript' | 'flow';
                          eagerEsModules?: boolean;
                          };
                          removeConsole?:
                          | boolean
                          | {
                          exclude?: string[];
                          };
                          styledComponents?: boolean | StyledComponentsConfig;
                          emotion?: boolean | EmotionConfig;
                          styledJsx?:
                          | boolean
                          | {
                          useLightningcss?: boolean;
                          };
                          /**
                          * Replaces variables in your code during compile time. Each key will be
                          * replaced with the respective values.
                          */
                          define?: Record<string, string>;
                          /**
                          * Replaces server-only (Node.js and Edge) variables in your code during compile time.
                          * Each key will be replaced with the respective values.
                          */
                          defineServer?: Record<string, string>;
                          /**
                          * A hook function that executes after production build compilation finishes,
                          * but before running post-compilation tasks such as type checking and
                          * static page generation.
                          */
                          runAfterProductionCompile?: (metadata: {
                          /**
                          * The root directory of the project
                          */
                          projectDir: string;
                          /**
                          * The build output directory (defaults to `.next`)
                          */
                          distDir: string;
                          }) => Promise<void>;
                          };
                          • Optionally enable compiler transforms

                            See Also

                            • [Supported Compiler Options](https://nextjs.org/docs/advanced-features/compiler#supported-features)

                          property compress

                          compress?: boolean;
                          • See Also

                            • [Compression documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/compress)

                          property crossOrigin

                          crossOrigin?: 'anonymous' | 'use-credentials';
                          • Add "crossorigin" attribute to generated <script> elements generated by <Head /> or <NextScript /> components

                            See Also

                            • [crossorigin attribute documentation](https://developer.mozilla.org/docs/Web/HTML/Attributes/crossorigin)

                          property deploymentId

                          deploymentId?: string;
                          • A unique identifier for a deployment that will be included in each request's query string or header.

                          property devIndicators

                          devIndicators?:
                          | false
                          | {
                          /**
                          * Position of the development tools indicator in the browser window.
                          * @default "bottom-left"
                          * */
                          position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
                          };
                          • Configure indicators in development environment

                          property distDir

                          distDir?: string;
                          • Destination directory (defaults to .next)

                          property enablePrerenderSourceMaps

                          enablePrerenderSourceMaps?: boolean;
                          • Enables source maps while generating static pages. Helps with errors during the prerender phase in next build.

                          property env

                          env?: Record<string, string | undefined>;
                          • Next.js comes with built-in support for environment variables

                            See Also

                            • [Environment Variables documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/env)

                          property excludeDefaultMomentLocales

                          excludeDefaultMomentLocales?: boolean;
                          • See Also

                            • [Moment.js locales excluded by default](https://nextjs.org/docs/upgrading#momentjs-locales-excluded-by-default)

                          property experimental

                          experimental?: ExperimentalConfig;
                          • Enable experimental features. Note that all experimental features are subject to breaking changes in the future.

                          property expireTime

                          expireTime?: number;
                          • period (in seconds) where the server allow to serve stale cache

                          property exportPathMap

                          exportPathMap?: (
                          defaultMap: ExportPathMap,
                          ctx: {
                          dev: boolean;
                          dir: string;
                          outDir: string | null;
                          distDir: string;
                          buildId: string;
                          }
                          ) => Promise<ExportPathMap> | ExportPathMap;

                            property generateBuildId

                            generateBuildId?: () => string | null | Promise<string | null>;
                            • See Also

                              • [Configuring the build ID](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateBuildId)

                            property generateEtags

                            generateEtags?: boolean;
                            • See Also

                              • [Disabling ETag Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags)

                            property headers

                            headers?: () => Promise<Header[]> | Header[];
                            • Headers allow you to set custom HTTP headers for an incoming request path.

                              See Also

                              • [Headers configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/headers)

                            property htmlLimitedBots

                            htmlLimitedBots?: RegExp;
                            • User Agent of bots that can handle streaming metadata. Besides the default behavior, Next.js act differently on serving metadata to bots based on their capability.

                              /Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview/i

                            property httpAgentOptions

                            httpAgentOptions?: {
                            keepAlive?: boolean;
                            };
                            • Next.js enables HTTP Keep-Alive by default. You may want to disable HTTP Keep-Alive for certain fetch() calls or globally.

                              See Also

                              • [Disabling HTTP Keep-Alive](https://nextjs.org/docs/app/api-reference/next-config-js/httpAgentOptions)

                            property i18n

                            i18n?: I18NConfig | null;
                            • Internationalization configuration

                              See Also

                              • [Internationalization docs](https://nextjs.org/docs/advanced-features/i18n-routing)

                            property images

                            images?: ImageConfig;
                            • See Also

                              • [Using the Image Component](https://nextjs.org/docs/app/api-reference/next-config-js/images)

                            property logging

                            logging?: LoggingConfig | false;
                            • Logging configuration. Set to false to disable logging.

                            property modularizeImports

                            modularizeImports?: Record<
                            string,
                            {
                            transform: string | Record<string, string>;
                            preventFullImport?: boolean;
                            skipDefaultConversion?: boolean;
                            }
                            >;

                              property onDemandEntries

                              onDemandEntries?: {
                              /** period (in ms) where the server will keep pages in the buffer */
                              maxInactiveAge?: number;
                              /** number of pages that should be kept simultaneously without being disposed */
                              pagesBufferLength?: number;
                              };
                              • Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development.

                                See Also

                                • [Configuring onDemandEntries](https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries)

                              property output

                              output?: 'standalone' | 'export';
                              • The type of build output. - undefined: The default build output, .next directory, that works with production mode next start or a hosting provider like Vercel - 'standalone': A standalone build output, .next/standalone directory, that only includes necessary files/dependencies. Useful for self-hosting in a Docker container. - 'export': An exported build output, out directory, that only includes static HTML/CSS/JS. Useful for self-hosting without a Node.js server.

                                See Also

                                • [Output File Tracing](https://nextjs.org/docs/advanced-features/output-file-tracing)

                                • [Static HTML Export](https://nextjs.org/docs/advanced-features/static-html-export)

                              property outputFileTracingExcludes

                              outputFileTracingExcludes?: Record<string, string[]>;
                              • This allows manually excluding traced files if too many are included incorrectly on a per-page basis.

                              property outputFileTracingIncludes

                              outputFileTracingIncludes?: Record<string, string[]>;
                              • This allows manually including traced files if some were not detected on a per-page basis.

                              property outputFileTracingRoot

                              outputFileTracingRoot?: string;
                              • This is the repo root usually and only files above this directory are traced and included.

                              property pageExtensions

                              pageExtensions?: string[];
                              • See Also

                                • [Including non-page files in the pages directory](https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions)

                              property poweredByHeader

                              poweredByHeader?: boolean;
                              • See Also

                                • [Disabling x-powered-by](https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader)

                              property productionBrowserSourceMaps

                              productionBrowserSourceMaps?: boolean;
                              • Enable browser source map generation during the production build

                                See Also

                                • [Source Maps](https://nextjs.org/docs/advanced-features/source-maps)

                              property reactCompiler

                              reactCompiler?: boolean | ReactCompilerOptions;
                              • Enable . Configuration accepts partial config object of the Compiler. If provided, the Compiler will be enabled.

                              property reactMaxHeadersLength

                              reactMaxHeadersLength?: number;
                              • The maximum length of the headers that are emitted by React and added to the response.

                                See Also

                                • [React Max Headers Length](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength)

                              property reactProductionProfiling

                              reactProductionProfiling?: boolean;
                              • Enable react profiling in production

                              property reactStrictMode

                              reactStrictMode?: boolean | null;
                              • The Next.js runtime is Strict Mode-compliant.

                                See Also

                                • [React Strict Mode](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactStrictMode)

                              property redirects

                              redirects?: () => Promise<Redirect[]> | Redirect[];
                              • Redirects allow you to redirect an incoming request path to a different destination path.

                                See Also

                                • [Redirects configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects)

                              property rewrites

                              rewrites?: () =>
                              | Promise<
                              | Rewrite[]
                              | {
                              beforeFiles?: Rewrite[];
                              afterFiles?: Rewrite[];
                              fallback?: Rewrite[];
                              }
                              >
                              | Rewrite[]
                              | {
                              beforeFiles?: Rewrite[];
                              afterFiles?: Rewrite[];
                              fallback?: Rewrite[];
                              };
                              • Rewrites allow you to map an incoming request path to a different destination path.

                                See Also

                                • [Rewrites configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites)

                              property sassOptions

                              sassOptions?: {
                              implementation?: string;
                              [key: string]: any;
                              };
                              • See Also

                                • [Customizing sass options](https://nextjs.org/docs/app/api-reference/next-config-js/sassOptions)

                              property serverExternalPackages

                              serverExternalPackages?: string[];
                              • A list of packages that should be treated as external in the server build.

                                See Also

                                • https://nextjs.org/docs/app/api-reference/next-config-js/serverExternalPackages

                              property skipMiddlewareUrlNormalize

                              skipMiddlewareUrlNormalize?: boolean;
                              • Deprecated

                                Use skipProxyUrlNormalize instead.

                              property skipProxyUrlNormalize

                              skipProxyUrlNormalize?: boolean;

                                property skipTrailingSlashRedirect

                                skipTrailingSlashRedirect?: boolean;

                                  property staticPageGenerationTimeout

                                  staticPageGenerationTimeout?: number;
                                  • Timeout after waiting to generate static pages in seconds

                                    60

                                  property trailingSlash

                                  trailingSlash?: boolean;
                                  • By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash.

                                    false

                                    See Also

                                    • [Trailing Slash Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash)

                                  property transpilePackages

                                  transpilePackages?: string[];
                                  • Automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (node_modules). This replaces the next-transpile-modules package.

                                    See Also

                                    • [transpilePackages](https://nextjs.org/docs/advanced-features/compiler#module-transpilation)

                                  property turbopack

                                  turbopack?: TurbopackOptions;
                                  • Options for Turbopack. Temporarily also available as experimental.turbo for compatibility.

                                  property typedRoutes

                                  typedRoutes?: boolean;
                                  • Enable type checking for Link and Router.push, etc. This feature requires TypeScript in your project.

                                    See Also

                                    • [Typed Links documentation](https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links)

                                  property typescript

                                  typescript?: TypeScriptConfig;
                                  • See Also

                                    • [Next.js TypeScript documentation](https://nextjs.org/docs/app/api-reference/config/typescript)

                                  property useFileSystemPublicRoutes

                                  useFileSystemPublicRoutes?: boolean;
                                  • By default, Next will serve each file in the pages folder under a pathname matching the filename. To disable this behavior and prevent routing based set this to true.

                                    true

                                    See Also

                                    • [Disabling file-system routing](https://nextjs.org/docs/advanced-features/custom-server#disabling-file-system-routing)

                                  property watchOptions

                                  watchOptions?: {
                                  pollIntervalMs?: number;
                                  };

                                    property webpack

                                    webpack?: NextJsWebpackConfig | null;
                                    • Before continuing to add custom webpack configuration to your application make sure Next.js doesn't already support your use-case

                                      See Also

                                      • [Custom Webpack Config documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack)

                                    interface NextPageContext

                                    interface NextPageContext {}
                                    • Next context

                                    property AppTree

                                    AppTree: AppTreeType;
                                    • Component the tree of the App to use if needing to render separately

                                    property asPath

                                    asPath?: string;
                                    • String of the actual path including query.

                                    property defaultLocale

                                    defaultLocale?: string;
                                    • The configured default locale

                                    property err

                                    err?:
                                    | (Error & {
                                    statusCode?: number;
                                    })
                                    | null;
                                    • Error object if encountered during rendering

                                    property locale

                                    locale?: string;
                                    • The currently active locale

                                    property locales

                                    locales?: readonly string[];
                                    • All configured locales

                                    property pathname

                                    pathname: string;
                                    • Path section of URL.

                                    property query

                                    query: ParsedUrlQuery;
                                    • Query string section of URL parsed as an object.

                                    property req

                                    req?: IncomingMessage;
                                    • HTTP request object.

                                    property res

                                    res?: ServerResponse;
                                    • HTTP response object.

                                    interface ResolvedViewport

                                    interface ResolvedViewport extends ViewportLayout {}

                                      property colorScheme

                                      colorScheme: null | ColorSchemeEnum;

                                        property themeColor

                                        themeColor: null | ThemeColorDescriptor[];

                                          interface Viewport

                                          interface Viewport extends ViewportLayout {}
                                          • Interface for the viewport configuration.

                                            Remarks

                                            This configuration allows defining properties such as width, initial scale, theme colors, and color scheme.

                                            Example 1

                                            export const viewport: Viewport = {
                                            width: "device-width",
                                            initialScale: 1,
                                            themeColor: [
                                            { media: "(prefers-color-scheme: dark)", color: "#000000" },
                                            { media: "(prefers-color-scheme: light)", color: "#ffffff" }
                                            ],
                                            colorScheme: "dark"
                                            }

                                          property colorScheme

                                          colorScheme?: null | ColorSchemeEnum | undefined;
                                          • The color scheme for the document.

                                            Example 1

                                            colorScheme: "dark"
                                            // Renders <meta name="color-scheme" content="dark" />

                                          property themeColor

                                          themeColor?:
                                          | null
                                          | string
                                          | ThemeColorDescriptor
                                          | ThemeColorDescriptor[]
                                          | undefined;
                                          • The theme color for the document.

                                            Example 1

                                            themeColor: "#000000"
                                            // Renders <meta name="theme-color" content="#000000" />
                                            themeColor: { media: "(prefers-color-scheme: dark)", color: "#000000" }
                                            // Renders <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#000000" />
                                            themeColor: [
                                            { media: "(prefers-color-scheme: dark)", color: "#000000" },
                                            { media: "(prefers-color-scheme: light)", color: "#ffffff" }
                                            ]
                                            // Renders <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#000000" />
                                            // Renders <meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />

                                          Type Aliases

                                          type FileSizeSuffix

                                          type FileSizeSuffix = `${'k' | 'K' | 'm' | 'M' | 'g' | 'G' | 't' | 'T' | 'p' | 'P'}${
                                          | 'b'
                                          | 'B'}`;

                                            type GetServerSideProps

                                            type GetServerSideProps<
                                            Props extends {
                                            [key: string]: any;
                                            } = {
                                            [key: string]: any;
                                            },
                                            Params extends ParsedUrlQuery = ParsedUrlQuery,
                                            Preview extends PreviewData = PreviewData
                                            > = (
                                            context: GetServerSidePropsContext<Params, Preview>
                                            ) => Promise<GetServerSidePropsResult<Props>>;
                                            • Server-side Rendering feature for Next.js. https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props https://nextjs.org/docs/pages/api-reference/config/typescript#static-generation-and-server-side-rendering

                                              Example 1

                                              ```ts export const getServerSideProps: GetServerSideProps = async (context) => { // ... }

                                            type GetServerSidePropsContext

                                            type GetServerSidePropsContext<
                                            Params extends ParsedUrlQuery = ParsedUrlQuery,
                                            Preview extends PreviewData = PreviewData
                                            > = {
                                            req: IncomingMessage & {
                                            cookies: NextApiRequestCookies;
                                            };
                                            res: ServerResponse;
                                            params?: Params;
                                            query: ParsedUrlQuery;
                                            preview?: boolean;
                                            previewData?: Preview;
                                            draftMode?: boolean;
                                            resolvedUrl: string;
                                            locale?: string;
                                            locales?: string[];
                                            defaultLocale?: string;
                                            };
                                            • Context object passed into getServerSideProps. https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props#context-parameter

                                            type GetServerSidePropsResult

                                            type GetServerSidePropsResult<Props> =
                                            | {
                                            props: Props | Promise<Props>;
                                            }
                                            | {
                                            redirect: Redirect;
                                            }
                                            | {
                                            notFound: true;
                                            };
                                            • The return type of getServerSideProps. https://nextjs.org/docs/api-reference/data-fetching/get-server-side-props#getserversideprops-return-values

                                            type GetStaticPaths

                                            type GetStaticPaths<Params extends ParsedUrlQuery = ParsedUrlQuery> = (
                                            context: GetStaticPathsContext
                                            ) => Promise<GetStaticPathsResult<Params>> | GetStaticPathsResult<Params>;
                                            • Define a list of paths to be statically generated if dynamic routes exist. https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths https://nextjs.org/docs/pages/api-reference/config/typescript#static-generation-and-server-side-rendering

                                              Example 1

                                              export const getStaticPaths: GetStaticPaths = async () => {
                                              // ...
                                              }

                                            type GetStaticPathsContext

                                            type GetStaticPathsContext = {
                                            locales?: string[];
                                            defaultLocale?: string;
                                            };

                                              type GetStaticPathsResult

                                              type GetStaticPathsResult<Params extends ParsedUrlQuery = ParsedUrlQuery> = {
                                              paths: Array<
                                              | string
                                              | {
                                              params: Params;
                                              locale?: string;
                                              }
                                              >;
                                              fallback: GetStaticPathsFallback;
                                              };
                                              • The return type of getStaticPaths. https://nextjs.org/docs/api-reference/data-fetching/get-static-paths#getstaticpaths-return-values

                                              type GetStaticProps

                                              type GetStaticProps<
                                              Props extends {
                                              [key: string]: any;
                                              } = {
                                              [key: string]: any;
                                              },
                                              Params extends ParsedUrlQuery = ParsedUrlQuery,
                                              Preview extends PreviewData = PreviewData
                                              > = (
                                              context: GetStaticPropsContext<Params, Preview>
                                              ) => Promise<GetStaticPropsResult<Props>> | GetStaticPropsResult<Props>;
                                              • Static Site Generation feature for Next.js. https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props https://nextjs.org/docs/pages/api-reference/config/typescript#static-generation-and-server-side-rendering

                                                Example 1

                                                export const getStaticProps: GetStaticProps = async (context) => {
                                                // ...
                                                }

                                              type GetStaticPropsContext

                                              type GetStaticPropsContext<
                                              Params extends ParsedUrlQuery = ParsedUrlQuery,
                                              Preview extends PreviewData = PreviewData
                                              > = {
                                              params?: Params;
                                              preview?: boolean;
                                              previewData?: Preview;
                                              draftMode?: boolean;
                                              locale?: string;
                                              locales?: string[];
                                              defaultLocale?: string;
                                              revalidateReason?: 'on-demand' | 'build' | 'stale';
                                              };
                                              • Context object passed into getStaticProps. https://nextjs.org/docs/api-reference/data-fetching/get-static-props#context-parameter

                                              type GetStaticPropsResult

                                              type GetStaticPropsResult<Props> =
                                              | {
                                              props: Props;
                                              revalidate?: number | boolean;
                                              }
                                              | {
                                              redirect: Redirect;
                                              revalidate?: number | boolean;
                                              }
                                              | {
                                              notFound: true;
                                              revalidate?: number | boolean;
                                              };
                                              • The return type of getStaticProps. https://nextjs.org/docs/api-reference/data-fetching/get-static-props#getstaticprops-return-values

                                              type InferGetServerSidePropsType

                                              type InferGetServerSidePropsType<T extends (args: any) => any> = Awaited<
                                              Extract<
                                              Awaited<ReturnType<T>>,
                                              {
                                              props: any;
                                              }
                                              >['props']
                                              >;

                                                type InferGetStaticPropsType

                                                type InferGetStaticPropsType<T extends (args: any) => any> = Extract<
                                                Awaited<ReturnType<T>>,
                                                {
                                                props: any;
                                                }
                                                >['props'];

                                                  type NextApiHandler

                                                  type NextApiHandler<T = any> = (
                                                  req: NextApiRequest,
                                                  res: NextApiResponse<T>
                                                  ) => unknown | Promise<unknown>;
                                                  • Next API route handler

                                                  type NextApiResponse

                                                  type NextApiResponse<Data = any> = ServerResponse & {
                                                  /**
                                                  * Send data `any` data in response
                                                  */
                                                  send: Send<Data>;
                                                  /**
                                                  * Send data `json` data in response
                                                  */
                                                  json: Send<Data>;
                                                  status: (statusCode: number) => NextApiResponse<Data>;
                                                  redirect(url: string): NextApiResponse<Data>;
                                                  redirect(status: number, url: string): NextApiResponse<Data>;
                                                  /**
                                                  * Set draft mode
                                                  */
                                                  setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>;
                                                  /**
                                                  * Set preview data for Next.js' prerender mode
                                                  */
                                                  setPreviewData: (
                                                  data: object | string,
                                                  options?: {
                                                  /**
                                                  * Specifies the number (in seconds) for the preview session to last for.
                                                  * The given number will be converted to an integer by rounding down.
                                                  * By default, no maximum age is set and the preview session finishes
                                                  * when the client shuts down (browser is closed).
                                                  */
                                                  maxAge?: number;
                                                  /**
                                                  * Specifies the path for the preview session to work under. By default,
                                                  * the path is considered the "default path", i.e., any pages under "/".
                                                  */
                                                  path?: string;
                                                  }
                                                  ) => NextApiResponse<Data>;
                                                  /**
                                                  * Clear preview data for Next.js' prerender mode
                                                  */
                                                  clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>;
                                                  /**
                                                  * Revalidate a specific page and regenerate it using On-Demand Incremental
                                                  * Static Regeneration.
                                                  * The path should be an actual path, not a rewritten path. E.g. for
                                                  * "/blog/[slug]" this should be "/blog/post-1".
                                                  * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath
                                                  */
                                                  revalidate: (
                                                  urlPath: string,
                                                  opts?: {
                                                  unstable_onlyGenerated?: boolean;
                                                  }
                                                  ) => Promise<void>;
                                                  };
                                                  • Next API route response

                                                  type NextComponentType

                                                  type NextComponentType<
                                                  Context extends BaseContext = NextPageContext,
                                                  InitialProps = {},
                                                  Props = {}
                                                  > = ComponentType<Props> & {
                                                  /**
                                                  * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.
                                                  * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.
                                                  * @param context Context of `page`
                                                  */
                                                  getInitialProps?(context: Context): InitialProps | Promise<InitialProps>;
                                                  };

                                                    type NextPage

                                                    type NextPage<Props = {}, InitialProps = Props> = NextComponentType<
                                                    NextPageContext,
                                                    InitialProps,
                                                    Props
                                                    >;
                                                    • NextPage type, use it as a guide to create pages.

                                                    type PageConfig

                                                    type PageConfig = {
                                                    api?: {
                                                    /**
                                                    * Configures or disables body size limit warning. Can take a number or
                                                    * any string format supported by `bytes`, for example `1000`, `'500kb'` or
                                                    * `'3mb'`.
                                                    */
                                                    responseLimit?: ResponseLimit;
                                                    /**
                                                    * The byte limit of the body. This is the number of bytes or any string
                                                    * format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`.
                                                    */
                                                    bodyParser?:
                                                    | {
                                                    sizeLimit?: SizeLimit;
                                                    }
                                                    | false;
                                                    /**
                                                    * Flag to disable warning "API page resolved
                                                    * without sending a response", due to explicitly
                                                    * using an external API resolver, like express
                                                    */
                                                    externalResolver?: true;
                                                    };
                                                    env?: Array<string>;
                                                    /**
                                                    * Configures the longest time in seconds a serverless function can process an HTTP
                                                    * request before responding.
                                                    */
                                                    maxDuration?: number;
                                                    runtime?: ServerRuntime;
                                                    unstable_runtimeJS?: false;
                                                    unstable_JsPreload?: false;
                                                    };
                                                    • Config type, use it for export const config

                                                    type PreviewData

                                                    type PreviewData = string | false | object | undefined;

                                                      type Redirect

                                                      type Redirect =
                                                      | {
                                                      statusCode: 301 | 302 | 303 | 307 | 308;
                                                      destination: string;
                                                      basePath?: false;
                                                      }
                                                      | {
                                                      permanent: boolean;
                                                      destination: string;
                                                      basePath?: false;
                                                      };

                                                        type ResolvedMetadata

                                                        type ResolvedMetadata = WithStringifiedURLs<ResolvedMetadataWithURLs>;
                                                        • ResolvedMetadata represents the fully processed metadata after defaults are applied and relative URLs are composed with metadataBase.

                                                        type ResolvingMetadata

                                                        type ResolvingMetadata = Promise<ResolvedMetadata>;

                                                          type ResolvingViewport

                                                          type ResolvingViewport = Promise<ResolvedViewport>;

                                                            type ResponseLimit

                                                            type ResponseLimit = SizeLimit | boolean;

                                                              type Route

                                                              type Route<RouteInferType = any> = string & {};
                                                              • Stub route type for typedRoutes before next dev or next build is run https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links

                                                                Example 1

                                                                import type { Route } from 'next'
                                                                // ...
                                                                router.push(returnToPath as Route)

                                                              type ServerRuntime

                                                              type ServerRuntime = 'nodejs' | 'experimental-edge' | 'edge' | undefined;

                                                                type SizeLimit

                                                                type SizeLimit = number | `${number}${FileSizeSuffix}`;

                                                                  Namespaces

                                                                  namespace *.avif

                                                                  module '*.avif' {}

                                                                    variable content

                                                                    const content: StaticImageData;

                                                                      namespace *.bmp

                                                                      module '*.bmp' {}

                                                                        variable content

                                                                        const content: StaticImageData;

                                                                          namespace *.gif

                                                                          module '*.gif' {}

                                                                            variable content

                                                                            const content: StaticImageData;

                                                                              namespace *.ico

                                                                              module '*.ico' {}

                                                                                variable content

                                                                                const content: StaticImageData;

                                                                                  namespace *.jpeg

                                                                                  module '*.jpeg' {}

                                                                                    variable content

                                                                                    const content: StaticImageData;

                                                                                      namespace *.jpg

                                                                                      module '*.jpg' {}

                                                                                        variable content

                                                                                        const content: StaticImageData;

                                                                                          namespace *.module.css

                                                                                          module '*.module.css' {}

                                                                                            variable classes

                                                                                            const classes: { readonly [key: string]: string };

                                                                                              namespace *.module.sass

                                                                                              module '*.module.sass' {}

                                                                                                variable classes

                                                                                                const classes: { readonly [key: string]: string };

                                                                                                  namespace *.module.scss

                                                                                                  module '*.module.scss' {}

                                                                                                    variable classes

                                                                                                    const classes: { readonly [key: string]: string };

                                                                                                      namespace *.png

                                                                                                      module '*.png' {}

                                                                                                        variable content

                                                                                                        const content: StaticImageData;

                                                                                                          namespace *.svg

                                                                                                          module '*.svg' {}

                                                                                                            variable content

                                                                                                            const content: any;
                                                                                                            • Use any to avoid conflicts with @svgr/webpack plugin or babel-plugin-inline-react-svg plugin.

                                                                                                            namespace *.webp

                                                                                                            module '*.webp' {}

                                                                                                              variable content

                                                                                                              const content: StaticImageData;

                                                                                                                namespace client-only

                                                                                                                module 'client-only' {}

                                                                                                                  namespace Instrumentation

                                                                                                                  namespace Instrumentation {}

                                                                                                                    type onRequestError

                                                                                                                    type onRequestError = InstrumentationOnRequestError;

                                                                                                                      namespace MetadataRoute

                                                                                                                      namespace MetadataRoute {}

                                                                                                                        type Manifest

                                                                                                                        type Manifest = ManifestFile;

                                                                                                                          type Robots

                                                                                                                          type Robots = RobotsFile;

                                                                                                                            type Sitemap

                                                                                                                            type Sitemap = SitemapFile;

                                                                                                                              namespace next/dist/compiled/amphtml-validator

                                                                                                                              module 'next/dist/compiled/amphtml-validator' {}

                                                                                                                                function getInstance

                                                                                                                                getInstance: (validatorPath: string) => Promise<Validator>;

                                                                                                                                  type ValidationError

                                                                                                                                  type ValidationError = any;

                                                                                                                                    type Validator

                                                                                                                                    type Validator = {
                                                                                                                                    validateString(html: string): Promise<any>;
                                                                                                                                    };

                                                                                                                                      namespace next/dist/compiled/jest-worker

                                                                                                                                      module 'next/dist/compiled/jest-worker' {}

                                                                                                                                        class Worker

                                                                                                                                        class Worker {}

                                                                                                                                          constructor

                                                                                                                                          constructor(...args: any[]);

                                                                                                                                            method end

                                                                                                                                            end: () => any;

                                                                                                                                              namespace next/dist/compiled/next-devtools

                                                                                                                                              module 'next/dist/compiled/next-devtools' {}

                                                                                                                                                namespace next/dist/compiled/superstruct

                                                                                                                                                module 'next/dist/compiled/superstruct' {}

                                                                                                                                                  type Describe

                                                                                                                                                  type Describe<T> = any;

                                                                                                                                                    type Infer

                                                                                                                                                    type Infer<T = any> = any;

                                                                                                                                                      type Struct

                                                                                                                                                      type Struct<T, S> = any;

                                                                                                                                                        namespace next/dist/compiled/webpack/webpack

                                                                                                                                                        module 'next/dist/compiled/webpack/webpack' {}

                                                                                                                                                          variable BasicEvaluatedExpression

                                                                                                                                                          let BasicEvaluatedExpression: any;

                                                                                                                                                            variable GraphHelpers

                                                                                                                                                            let GraphHelpers: any;

                                                                                                                                                              variable sources

                                                                                                                                                              let sources: any;

                                                                                                                                                                variable StringXor

                                                                                                                                                                let StringXor: any;

                                                                                                                                                                  variable webpack

                                                                                                                                                                  var webpack: any;

                                                                                                                                                                    function init

                                                                                                                                                                    init: () => void;

                                                                                                                                                                      type LoaderDefinitionFunction

                                                                                                                                                                      type LoaderDefinitionFunction<T> = any;

                                                                                                                                                                        namespace next/dist/compiled/webpack/webpack.webpack

                                                                                                                                                                        namespace next/dist/compiled/webpack/webpack.webpack {}

                                                                                                                                                                          type Chunk

                                                                                                                                                                          type Chunk = any;

                                                                                                                                                                            type ChunkGroup

                                                                                                                                                                            type ChunkGroup = any;

                                                                                                                                                                              type Compilation

                                                                                                                                                                              type Compilation = any;

                                                                                                                                                                                type Compiler

                                                                                                                                                                                type Compiler = any;

                                                                                                                                                                                  type Configuration

                                                                                                                                                                                  type Configuration = any;

                                                                                                                                                                                    type DefinePlugin

                                                                                                                                                                                    type DefinePlugin = any;

                                                                                                                                                                                      type EntryObject

                                                                                                                                                                                      type EntryObject = any;

                                                                                                                                                                                        type LoaderContext

                                                                                                                                                                                        type LoaderContext<T> = any;

                                                                                                                                                                                          type Module

                                                                                                                                                                                          type Module = any;

                                                                                                                                                                                            type NormalModule

                                                                                                                                                                                            type NormalModule = any;

                                                                                                                                                                                              type ResolveOptions

                                                                                                                                                                                              type ResolveOptions = any;

                                                                                                                                                                                                type ResolvePluginInstance

                                                                                                                                                                                                type ResolvePluginInstance = any;

                                                                                                                                                                                                  type RuleSetUseItem

                                                                                                                                                                                                  type RuleSetUseItem = any;

                                                                                                                                                                                                    type RuntimeGlobals

                                                                                                                                                                                                    type RuntimeGlobals = any;

                                                                                                                                                                                                      type RuntimeModule

                                                                                                                                                                                                      type RuntimeModule = any;

                                                                                                                                                                                                        type Stats

                                                                                                                                                                                                        type Stats = any;

                                                                                                                                                                                                          type Template

                                                                                                                                                                                                          type Template = any;

                                                                                                                                                                                                            type WebpackPluginInstance

                                                                                                                                                                                                            type WebpackPluginInstance = any;

                                                                                                                                                                                                              namespace next/dist/compiled/webpack/webpack.webpack.sources

                                                                                                                                                                                                              namespace next/dist/compiled/webpack/webpack.webpack.sources {}

                                                                                                                                                                                                                type RawSource

                                                                                                                                                                                                                type RawSource = any;

                                                                                                                                                                                                                  namespace next/root-params

                                                                                                                                                                                                                  module 'next/root-params' {}

                                                                                                                                                                                                                    namespace react-server-dom-webpack/server

                                                                                                                                                                                                                    module 'react-server-dom-webpack/server' {}

                                                                                                                                                                                                                      namespace react-server-dom-webpack/static

                                                                                                                                                                                                                      module 'react-server-dom-webpack/static' {}

                                                                                                                                                                                                                        namespace server-only

                                                                                                                                                                                                                        module 'server-only' {}

                                                                                                                                                                                                                          namespace styled-jsx

                                                                                                                                                                                                                          module 'styled-jsx' {}

                                                                                                                                                                                                                            function createStyleRegistry

                                                                                                                                                                                                                            createStyleRegistry: () => StyledJsxStyleRegistry;

                                                                                                                                                                                                                              function StyleRegistry

                                                                                                                                                                                                                              StyleRegistry: ({
                                                                                                                                                                                                                              children,
                                                                                                                                                                                                                              registry,
                                                                                                                                                                                                                              }: {
                                                                                                                                                                                                                              children: JSX.Element | import('react').ReactNode;
                                                                                                                                                                                                                              registry?: StyledJsxStyleRegistry;
                                                                                                                                                                                                                              }) => JSX.Element;

                                                                                                                                                                                                                                function useStyleRegistry

                                                                                                                                                                                                                                useStyleRegistry: () => StyledJsxStyleRegistry;

                                                                                                                                                                                                                                  type StyledJsxStyleRegistry

                                                                                                                                                                                                                                  type StyledJsxStyleRegistry = {
                                                                                                                                                                                                                                  styles(options?: { nonce?: string }): JSX.Element[];
                                                                                                                                                                                                                                  flush(): void;
                                                                                                                                                                                                                                  add(props: any): void;
                                                                                                                                                                                                                                  remove(props: any): void;
                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                    namespace styled-jsx/css

                                                                                                                                                                                                                                    module 'styled-jsx/css' {}

                                                                                                                                                                                                                                      function css

                                                                                                                                                                                                                                      css: typeof css;

                                                                                                                                                                                                                                        function global

                                                                                                                                                                                                                                        global: (chunks: TemplateStringsArray, ...args: any[]) => JSX.Element;

                                                                                                                                                                                                                                          function resolve

                                                                                                                                                                                                                                          resolve: (
                                                                                                                                                                                                                                          chunks: TemplateStringsArray,
                                                                                                                                                                                                                                          ...args: any[]
                                                                                                                                                                                                                                          ) => { className: string; styles: JSX.Element };

                                                                                                                                                                                                                                            namespace styled-jsx/macro

                                                                                                                                                                                                                                            module 'styled-jsx/macro' {}

                                                                                                                                                                                                                                              function resolve

                                                                                                                                                                                                                                              resolve: (
                                                                                                                                                                                                                                              chunks: TemplateStringsArray,
                                                                                                                                                                                                                                              ...args: any[]
                                                                                                                                                                                                                                              ) => { className: string; styles: JSX.Element };

                                                                                                                                                                                                                                                namespace styled-jsx/style

                                                                                                                                                                                                                                                module 'styled-jsx/style' {}

                                                                                                                                                                                                                                                  function JSXStyle

                                                                                                                                                                                                                                                  JSXStyle: (props: any) => null;

                                                                                                                                                                                                                                                    namespace VAR_MODULE_APP

                                                                                                                                                                                                                                                    module 'VAR_MODULE_APP' {}

                                                                                                                                                                                                                                                      namespace VAR_MODULE_DOCUMENT

                                                                                                                                                                                                                                                      module 'VAR_MODULE_DOCUMENT' {}

                                                                                                                                                                                                                                                        namespace VAR_MODULE_GLOBAL_ERROR

                                                                                                                                                                                                                                                        module 'VAR_MODULE_GLOBAL_ERROR' {}

                                                                                                                                                                                                                                                          namespace VAR_USERLAND

                                                                                                                                                                                                                                                          module 'VAR_USERLAND' {}

                                                                                                                                                                                                                                                            Package Files (16)

                                                                                                                                                                                                                                                            Dependencies (5)

                                                                                                                                                                                                                                                            Dev Dependencies (221)

                                                                                                                                                                                                                                                            Peer Dependencies (6)

                                                                                                                                                                                                                                                            Badge

                                                                                                                                                                                                                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/next.

                                                                                                                                                                                                                                                            • Markdown
                                                                                                                                                                                                                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/next)
                                                                                                                                                                                                                                                            • HTML
                                                                                                                                                                                                                                                              <a href="https://www.jsdocs.io/package/next"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>