Files
Niklas MischkulnigandGitHub beee190d8b Fix repoRoot for adapters (#94478)
`repoRoot` shouldn't be `outputFileTracingRoot`. The user can configure
that to arbitrary values, which shouldn't change the adapter output.

The adapter now uses `NextConfigComplete.repoRoot` instead of
`outputFileTracingRoot`.

Closes NEXT-4942
2026-06-18 16:56:19 +02:00

16 lines
298 B
JavaScript

import fs from 'fs'
// @ts-check
/** @type {import('next').NextAdapter } */
const myAdapter = {
name: 'my-custom-adapter',
onBuildComplete: async (ctx) => {
await fs.promises.writeFile(
'build-complete.json',
JSON.stringify(ctx, null, 2)
)
},
}
export default myAdapter