Repository: remix-run/react-router
File: packages/react-router-dev/config/config.ts (TypeScript)

Code before:
   * The absolute path to the build directory.
   */
  buildDirectory: string;
  /**
   * A function that is called after the full React Router build is complete.
   */
  buildEnd?: BuildEndHook;
  /**
   * Enabled future flags
   */
  future: FutureConfig;
  /**
   * An array of URLs to prerender to HTML files at build time.  Can also be a
   * function returning an array to dynamically generate URLs.
   */
  prerender: ReactRouterConfig["prerender"];
  /**
   * Defaults to 1, which means "no concurrency" - fully serial execution.
   * Setting it to a value more than 1 enables concurrent prerendering.
   * For example, prerenderConcurrency of 2 would run prerender with the
   * concurrency of 2 (two pages at a time).
   * Setting it to a value higher than one can increase the speed of the build,
   * but may consume more resources, and send more concurrent requests to the
   * server/CMS.
   */
  prerenderConcurrency?: number;
  /**
   * Control the "Lazy Route Discovery" behavior
   *
   * - `routeDiscovery.mode`: By default, this resolves to `lazy` which will
   *   lazily discover routes as the user navigates around your application.
   *   You can set this to `initial` to opt-out of this behavior and load all
   *   routes with the initial HTML document load.
   * - `routeDiscovery.manifestPath`: The path to serve the manifest file from.
   *    Only applies to `mode: "lazy"` and defaults to `/__manifest`.
   */
  routeDiscovery: ReactRouterConfig["routeDiscovery"];
  /**
   * An object of all available routes, keyed by route id.
   */
  routes: RouteManifest;
  /**
   * The file name of the server build output. This file
   * should end in a `.js` extension and should be deployed to your server.
   * Defaults to `"index.js"`.
   */
  serverBuildFile: string;
  /**
   * A function for assigning routes to different server bundles. This
   * function should return a server bundle ID which will be used as the
   * bundle's directory name within the server build directory.

Review comment (suggestion):
Could we lump this into a new object format for `ReactRouterConfig["prerender"]` instead of a new key?

```ts
  prerender?:
    | boolean
    | Array<string>
    | ((args: {
        getStaticPaths: () => string[];
      }) => Array<string> | Promise<Array<string>>)
    | {
        paths:
          | boolean
          | Array<string>
          | ((args: {
              getStaticPaths: () => string[];
            }) => Array<string> | Promise<Array<string>>);
        concurrency?: number;
      };

```


Code after:
  ssr?: boolean;
};

export type ResolvedReactRouterConfig = Readonly<{
  /**
   * The absolute path to the application source directory.
   */
  appDirectory: string;
  /**
   * The React Router app basename.  Defaults to `"/"`.
   */
  basename: string;
  /**
   * The absolute path to the build directory.
   */
  buildDirectory: string;
  /**
   * A function that is called after the full React Router build is complete.
   */
  buildEnd?: BuildEndHook;
  /**
   * Enabled future flags
   */
  future: FutureConfig;
  /**
   * An array of URLs to prerender to HTML files at build time.  Can also be a
   * function returning an array to dynamically generate URLs.
   */
  prerender: ReactRouterConfig["prerender"];
  /**
   * Control the "Lazy Route Discovery" behavior
   *
   * - `routeDiscovery.mode`: By default, this resolves to `lazy` which will
   *   lazily discover routes as the user navigates around your application.
   *   You can set this to `initial` to opt-out of this behavior and load all
   *   routes with the initial HTML document load.
   * - `routeDiscovery.manifestPath`: The path to serve the manifest file from.
   *    Only applies to `mode: "lazy"` and defaults to `/__manifest`.
   */
  routeDiscovery: ReactRouterConfig["routeDiscovery"];
  /**
   * An object of all available routes, keyed by route id.
   */
  routes: RouteManifest;
  /**
   * The file name of the server build output. This file
   * should end in a `.js` extension and should be deployed to your server.
   * Defaults to `"index.js"`.
   */
  serverBuildFile: string;
  /**