mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
`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
16 lines
298 B
JavaScript
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
|