Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
1.9 KiB
1.9 KiB
| title | description |
|---|---|
| API Reference | Reference for `modifyConfig` and `onBuildComplete` in the `NextAdapter` interface. |
async modifyConfig(config, context)
Called for any CLI command that loads the next.config.js file to allow modification of the configuration.
Parameters:
config: The complete Next.js configuration objectcontext.phase: The current build phase (see phases)context.nextVersion: Version of Next.js being used
Returns: The modified configuration object (can be async)
async onBuildComplete(context)
Called after the build process completes with detailed information about routes and outputs.
Parameters:
context.routing: Object containing Next.js routing phases and metadatarouting.beforeMiddleware: Routes executed before middleware (includes header and redirect handling)routing.beforeFiles: Rewrite routes checked before filesystem route matchingrouting.afterFiles: Rewrite routes checked after filesystem route matchingrouting.dynamicRoutes: Dynamic route matching tablerouting.onMatch: Routes applied after a successful match (for example immutable static asset cache headers)routing.fallback: Final rewrite fallback routesrouting.shouldNormalizeNextData: Whether/_next/data/<buildId>/...URLs should be normalized during matchingrouting.rsc: Route metadata used for React Server Components routing behavior
context.outputs: Detailed information about all build outputs organized by typecontext.projectDir: Absolute path to the Next.js project directorycontext.repoRoot: Absolute path to the detected repository rootcontext.distDir: Absolute path to the build output directorycontext.config: The final Next.js configuration (withmodifyConfigapplied)context.nextVersion: Version of Next.js being usedcontext.buildId: Unique identifier for the current build